]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: set hostname in slave.yml
authorAndrew Schoen <aschoen@redhat.com>
Wed, 21 Sep 2016 16:40:39 +0000 (11:40 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 21 Sep 2016 16:40:39 +0000 (11:40 -0500)
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 <aschoen@redhat.com>
ansible/examples/slave.yml

index 9b71c118b2c6f80477483055c8124a0fbdb804c2..f22c1ed295e615dcbef21d550d2210a6e75a8fca 100644 (file)
         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: