Merge "Use stat module instead of "test -s""
This commit is contained in:
commit
93c2e27178
|
@ -261,10 +261,13 @@ outputs:
|
|||
register: os_net_config_need_upgrade
|
||||
when: step|int == 3
|
||||
- name: Check that os-net-config has configuration
|
||||
shell: test -s /etc/os-net-config/config.json
|
||||
register: os_net_config_has_config
|
||||
failed_when: false
|
||||
when: step|int == 3
|
||||
stat:
|
||||
path: /etc/os-net-config/config.json
|
||||
get_attributes: false
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
register: stat_config_json
|
||||
- block:
|
||||
- name: Upgrade os-net-config
|
||||
package: name=os-net-config state=latest
|
||||
|
@ -276,7 +279,7 @@ outputs:
|
|||
when:
|
||||
- step|int == 3
|
||||
- os_net_config_need_upgrade.stdout
|
||||
- os_net_config_has_config.rc == 0
|
||||
- stat_config_json.stat.exists
|
||||
# Exclude ansible until https://github.com/ansible/ansible/issues/56636
|
||||
# is available
|
||||
- name: Update all packages
|
||||
|
|
Loading…
Reference in New Issue