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