Merge "Ignore Ansible warnings for mount/tar"

This commit is contained in:
Jenkins 2017-06-30 00:38:25 +00:00 committed by Gerrit Code Review
commit 9ad5dbbf92
2 changed files with 8 additions and 1 deletions

View File

@ -26,11 +26,14 @@
# 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.
# 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

View File

@ -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]