(fix) lxc: Fix container existance check to be able to run in check_mode

This commit is contained in:
Ludovic Poujol 2020-04-08 17:57:46 +02:00
parent bd63e7037f
commit 93c043c8e0
2 changed files with 3 additions and 0 deletions

View file

@ -93,6 +93,7 @@ The **patch** part changes incrementally at each release.
* etc-git: fix warnings ansible-lint * etc-git: fix warnings ansible-lint
* evoadmin-web: Put the php config at the right place for Buster * evoadmin-web: Put the php config at the right place for Buster
* lxc: Don't stop the container if it already exists * lxc: Don't stop the container if it already exists
* lxc: Fix container existance check to be able to run in check_mode
* lxc-php: Don't remove the default pool * lxc-php: Don't remove the default pool
* minifirewall: fix warnings ansible-lint * minifirewall: fix warnings ansible-lint
* nginx: fix munin fcgi not working (missing chmod 660 on logs) * nginx: fix munin fcgi not working (missing chmod 660 on logs)
@ -109,6 +110,7 @@ The **patch** part changes incrementally at each release.
* php: Chose the debian version repo archive for packages.sury.org * php: Chose the debian version repo archive for packages.sury.org
* php: update surry_post.yml to match current latest PHP release * php: update surry_post.yml to match current latest PHP release
* packweb-apache: Don't try to install PHPMyAdmin on Buster as it's not available * packweb-apache: Don't try to install PHPMyAdmin on Buster as it's not available
*
### Removed ### Removed
* clamav : do not install the zoo package anymore * clamav : do not install the zoo package anymore

View file

@ -2,6 +2,7 @@
- name: "Check if container {{ name }} exists" - name: "Check if container {{ name }} exists"
command: "lxc-ls {{name}}" command: "lxc-ls {{name}}"
changed_when: false changed_when: false
check_mode: no
register: container_exists register: container_exists
- name: "Create container {{ name }}" - name: "Create container {{ name }}"