Merge "Ignore Ansible warnings for mount/tar"
This commit is contained in:
commit
9ad5dbbf92
@ -25,12 +25,15 @@
|
||||
state: "absent"
|
||||
|
||||
# This is using a shell command because the ansible archive module does not
|
||||
# provide for the options needed to properly create an LXC image archive.
|
||||
# provide for the options needed to properly create an LXC image archive.
|
||||
# Ansible will print a warning since this task calls 'tar' directly and we
|
||||
# suppress this warning with 'warn: no'.
|
||||
- name: Create lxc image
|
||||
shell: |
|
||||
tar -Opc -C {{ lxc_image_cache_path }} . | {{ lxc_xz_bin }} -{{ lxc_image_compression_ratio }} -c - > rootfs.tar.xz
|
||||
args:
|
||||
chdir: "{{ cache_path_fact }}/"
|
||||
warn: no
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
|
||||
|
@ -95,8 +95,12 @@
|
||||
when:
|
||||
- machine1_conf | changed
|
||||
|
||||
# Ignore the Ansible warning here about using 'mount' via the shell module
|
||||
# instead of using the mount Ansible module.
|
||||
- name: Mount all
|
||||
shell: "mount | grep '/var/lib/machines' || (systemctl start var-lib-machines.mount && exit 3)"
|
||||
args:
|
||||
warn: no
|
||||
register: mount_machines
|
||||
changed_when: mount_machines.rc == 3
|
||||
failed_when: mount_machines.rc not in [0, 3]
|
||||
|
Loading…
Reference in New Issue
Block a user