set "check_mode: no" for read-only "shell" steps that registers result

"shell" step doesn't support check mode, which currently leads to failures,
when Ansible is being run in check mode (because Ansible doesn't run command,
assuming that command might have effect, and no "rc" or "output" is registered).

Setting "check_mode: no" allows to run those "shell" commands in check mode
(which is safe, because those shell commands doesn't have side effects).
This commit is contained in:
Vladimir Rutsky
2017-02-06 21:13:21 +03:00
parent 9667ac3baf
commit 09847567ae
12 changed files with 20 additions and 0 deletions

View File

@@ -108,6 +108,7 @@
shell: rpm -qa | grep epel-release || rpm -ivh {{ epel_rpm_download_url }}
when: ansible_distribution in ["CentOS","RedHat"]
changed_when: False
check_mode: no
tags: bootstrap-os
- name: Install packages requirements

View File

@@ -4,6 +4,7 @@
register: resolvconf
failed_when: false
changed_when: false
check_mode: no
- set_fact:
resolvconf: >-