Ensure that container config/command order is correct
This patch ensures that the config application and command execution are completed in the same order as the lxc_container module. This ensures that any bind-mounts to the host can have the container directory created prior to the implementation of the drive mount. With these tasks in the reverse order, the container cache would have to have all the required directories in place already. Change-Id: Ib8c289da2f4eb2d0e52b2d75376dd73dd9b2a650
This commit is contained in:
parent
256785f3ff
commit
9e43493591
@ -103,6 +103,16 @@
|
||||
tags:
|
||||
- lxc-container-create
|
||||
|
||||
- name: Execute container commands
|
||||
lxc_container:
|
||||
name: "{{ inventory_hostname }}"
|
||||
container_command: |
|
||||
{{ lxc_container_map.prep_commands }}
|
||||
{{ lxc_container_commands }}
|
||||
delegate_to: "{{ physical_host }}"
|
||||
tags:
|
||||
- lxc-container-commands
|
||||
|
||||
- name: Write default container config
|
||||
lineinfile:
|
||||
dest: "/var/lib/lxc/{{ inventory_hostname }}/config"
|
||||
@ -115,16 +125,6 @@
|
||||
tags:
|
||||
- lxc-container-config
|
||||
|
||||
- name: Execute container commands
|
||||
lxc_container:
|
||||
name: "{{ inventory_hostname }}"
|
||||
container_command: |
|
||||
{{ lxc_container_map.prep_commands }}
|
||||
{{ lxc_container_commands }}
|
||||
delegate_to: "{{ physical_host }}"
|
||||
tags:
|
||||
- lxc-container-commands
|
||||
|
||||
- name: Container network interfaces
|
||||
lxc_container:
|
||||
name: "{{ inventory_hostname }}"
|
||||
|
Loading…
Reference in New Issue
Block a user