diff options
author | Russell Teague <rteague@redhat.com> | 2017-02-20 11:06:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-20 11:06:27 -0500 |
commit | 9492616511632c26bf42f786c6fba5f40f15d4d9 (patch) | |
tree | 68142ff0cd5b097b90d20a28adb89624aeaa1f3a /playbooks/common/openshift-node/restart.yml | |
parent | da29eaf72d89933d65f57e67a148bfdf0bff7571 (diff) | |
parent | 7f232159717b9fdb13cbbea550623ed61aad5ac7 (diff) | |
download | openshift-9492616511632c26bf42f786c6fba5f40f15d4d9.tar.gz openshift-9492616511632c26bf42f786c6fba5f40f15d4d9.tar.bz2 openshift-9492616511632c26bf42f786c6fba5f40f15d4d9.tar.xz openshift-9492616511632c26bf42f786c6fba5f40f15d4d9.zip |
Merge pull request #3407 from mtnbikenc/oc-mod-playbooks
Updating node playbooks to use oc_obj
Diffstat (limited to 'playbooks/common/openshift-node/restart.yml')
-rw-r--r-- | playbooks/common/openshift-node/restart.yml | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/playbooks/common/openshift-node/restart.yml b/playbooks/common/openshift-node/restart.yml index 6e9b1cca3..5e1df951c 100644 --- a/playbooks/common/openshift-node/restart.yml +++ b/playbooks/common/openshift-node/restart.yml @@ -2,16 +2,24 @@ - name: Restart nodes hosts: oo_nodes_to_config serial: "{{ openshift_restart_nodes_serial | default(1) }}" + + roles: + - lib_openshift + tasks: - name: Restart docker - service: name=docker state=restarted + service: + name: docker + state: restarted - name: Update docker facts openshift_facts: role: docker - name: Restart containerized services - service: name={{ item }} state=started + service: + name: "{{ item }}" + state: started with_items: - etcd_container - openvswitch @@ -36,12 +44,14 @@ state: restarted - name: Wait for node to be ready - command: > - {{ hostvars[groups.oo_first_master.0].openshift.common.client_binary }} get node {{ openshift.common.hostname | lower }} --no-headers + oc_obj: + state: list + kind: node + name: "{{ openshift.common.hostname | lower }}" register: node_output delegate_to: "{{ groups.oo_first_master.0 }}" when: inventory_hostname in groups.oo_nodes_to_config - until: "{{ node_output.stdout.split()[1].startswith('Ready')}}" + until: node_output.results.results[0].status.conditions | selectattr('type', 'equalto', 'Ready') | map(attribute='status') | join | bool == True # Give the node two minutes to come back online. retries: 24 delay: 5 |