diff options
author | Jhon Honce <jhonce@redhat.com> | 2015-02-17 10:07:09 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2015-02-17 10:10:39 -0700 |
commit | 16ab19a24e6e2122f3f1b8f229b8bb20c88045cd (patch) | |
tree | fff3ddfa31401b932908b3f98aff77f811bf47f1 /roles/openshift_node/tasks | |
parent | 90010f6db6294a99c56194afd89a0359a3d278dc (diff) | |
download | openshift-16ab19a24e6e2122f3f1b8f229b8bb20c88045cd.tar.gz openshift-16ab19a24e6e2122f3f1b8f229b8bb20c88045cd.tar.bz2 openshift-16ab19a24e6e2122f3f1b8f229b8bb20c88045cd.tar.xz openshift-16ab19a24e6e2122f3f1b8f229b8bb20c88045cd.zip |
* Use hostname module
* Use mktemp for scratch directory
Diffstat (limited to 'roles/openshift_node/tasks')
-rw-r--r-- | roles/openshift_node/tasks/main.yml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index 73383da2c..f1b2e9ac0 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -6,17 +6,20 @@ # fixme: Once openshift stops resolving hostnames for node queries remove this... - name: Set hostname to IP Addr (WORKAROUND) - command: /usr/bin/hostname {{ oo_bind_ip }} + hostname: name={{ oo_bind_ip }} + +- local_action: command /usr/bin/mktemp -d /tmp/openshift-ansible-XXXXXXX + register: mktemp - name: Retrieve OpenShift Master credentials - local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' root@{{ oo_master_public_ips[0] }}:/var/lib/openshift/openshift.local.certificates/admin/ {{ tmp_dir }} + local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' root@{{ oo_master_public_ips[0] }}:/var/lib/openshift/openshift.local.certificates/admin/ {{ mktemp.stdout }} ignore_errors: yes - file: path=/var/lib/openshift/openshift.local.certificates/admin state=directory -- file: path={{ tmp_dir }} state=directory +- file: path={{ mktemp.stdout }} state=directory - name: Store OpenShift Master credentials - local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' {{ tmp_dir }}/ root@{{ oo_public_ip }}:/var/lib/openshift/openshift.local.certificates/admin + local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' {{ mktemp.stdout }}/ root@{{ oo_public_ip }}:/var/lib/openshift/openshift.local.certificates/admin ignore_errors: yes - name: Configure OpenShift Node settings @@ -38,4 +41,4 @@ - name: Enable OpenShift service: name=openshift-node enabled=yes state=started -- file: name={{ tmp_dir }} state=absent +- file: name={{ mktemp.stdout }} state=absent |