lxc-php-buster #85
|
@ -96,9 +96,9 @@
|
|||
when: name == 'php73'
|
||||
|
||||
- name: Configure mailname
|
||||
lineinfile:
|
||||
template:
|
||||
src: mailname.j2
|
||||
dest: "/var/lib/lxc/{{name}}/rootfs/etc/mailname"
|
||||
line: "{{ansible_fqdn}}"
|
||||
notify: "Restart opensmtpd"
|
||||
when: name == 'php73'
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
lxc_unprivilegied_containers: false
|
||||
|
||||
# Network type to use. See lxc.container.conf(5).
|
||||
lxc_network_type: "none"
|
||||
lxc_net_0_type: "none"
|
||||
|
||||
# Partition to bind mount into containers.
|
||||
lxc_mount_part: "/home"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
register: container_exists
|
||||
|
||||
- name: Create container
|
||||
command: "lxc-create --name {{name}} --template debian --bdev dir --logfile /var/log/lxc/lxc-{{name}}.log --logpriority INFO -- --arch amd64 --release {{release}}"
|
||||
command: "lxc-create --name {{name}} --template download --bdev dir --logfile /var/log/lxc/lxc-{{name}}.log --logpriority INFO -- --dist debian --release {{release}} --arch amd64"
|
||||
when: container_exists.stdout_lines == []
|
||||
|
||||
#- name: Create container
|
||||
|
@ -13,22 +13,23 @@
|
|||
# name: "{{name}}"
|
||||
# container_log: true
|
||||
# template: download
|
||||
# state: stopped
|
||||
# state: started
|
||||
# template_options: "--release {{release}}"
|
||||
# when: container_exists.stdout_lines == []
|
||||
|
||||
- name: Disable network configuration inside container
|
||||
replace:
|
||||
name: "/var/lib/lxc/{{name}}/rootfs/etc/default/networking"
|
||||
regexp: "^#CONFIGURE_INTERFACES=yes"
|
||||
replace: CONFIGURE_INTERFACES=no
|
||||
when: lxc_network_type == "none"
|
||||
when: lxc_net_0_type == "none"
|
||||
|
||||
- name: Disable interface shut down on halt inside container
|
||||
lineinfile:
|
||||
name: "/var/lib/lxc/{{name}}/rootfs/etc/default/halt"
|
||||
line: "NETDOWN=no"
|
||||
when:
|
||||
- lxc_network_type == "none"
|
||||
- lxc_net_0_type == "none"
|
||||
- release != "stretch"
|
||||
- release != "buster"
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ lxc.id_map = g 0 100000 10000
|
|||
|
||||
{% endif %}
|
||||
# Set the default network virtualization method.
|
||||
lxc.network.type = {{lxc_network_type}}
|
||||
lxc.net.0.type = {{lxc_net_0_type}}
|
||||
|
||||
{% if lxc_mount_part %}
|
||||
# Mount {{lxc_mount_part}} into containers.
|
||||
|
@ -16,7 +16,7 @@ lxc.mount.entry = {{lxc_mount_part}} {{lxc_mount_part |replace('/', '')}} none b
|
|||
{% endif %}
|
||||
# Only one tty is enough.
|
||||
# This require that you disabled others tty ([2-6]) in systemd.
|
||||
lxc.tty = 1
|
||||
lxc.tty.max = 1
|
||||
|
||||
# Run 64bits containers
|
||||
lxc.arch = x86_64
|
||||
|
|
Loading…
Reference in a new issue