From: Andrew Schoen Date: Wed, 21 Sep 2016 16:40:39 +0000 (-0500) Subject: ansible: set hostname in slave.yml X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd8a19f5ef67a9fa175d7b10a542e2b090e94645;p=ceph-build.git ansible: set hostname in slave.yml This avoids an issue on OVH nodes where sudo does not work. When trying to use sudo on these nodes we see: sudo: unable to resolve host (none) Signed-off-by: Andrew Schoen --- diff --git a/ansible/examples/slave.yml b/ansible/examples/slave.yml index 9b71c118..f22c1ed2 100644 --- a/ansible/examples/slave.yml +++ b/ansible/examples/slave.yml @@ -182,6 +182,11 @@ path: "/home/{{ jenkins_user }}/.gitconfig" owner: "{{ jenkins_user }}" + - name: Set Hostname with hostname command + sudo: yes + hostname: + name: "{{ ansible_hostname }}" + - name: ensure that the current host is in /etc/hosts. Yes this is a thing. sudo: true replace: