Fix new node detection

For the openshift-node service, the new_node detection was checking for
stdout instead of rc causing it to always tag nodes as new. This commit
fixes it.

Change-Id: I518f386395b515f59e98877274f4a0fce52ec4d5
Closes-Bug: #1802323
This commit is contained in:
Martin André 2018-10-26 18:28:30 +02:00
parent c1bf5d8b10
commit 346929d966
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ outputs:
# exited with 1 in the previous task.
- set_fact:
nodes:
- new_node: "{{node_services.results | selectattr('item', 'equalto', item) | selectattr('stdout', 'greaterthan', 0) | list | count > 0}}"
- new_node: "{{node_services.results | selectattr('item', 'equalto', item) | selectattr('rc', 'greaterthan', 0) | list | count > 0}}"
hostname: "{{item}}"
ansible_user: "{{ hostvars[item]['ansible_user'] | default(hostvars[item]['ansible_ssh_user']) | default('root') }}"
ansible_host: "{{ hostvars[item]['ansible_host'] | default(item) }}"