]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: always add 'ceph-builders' to /etc/hosts 490/head
authorAndrew Schoen <aschoen@redhat.com>
Tue, 27 Sep 2016 21:13:38 +0000 (16:13 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 27 Sep 2016 21:16:49 +0000 (16:16 -0500)
The nodes we spin up in OVH are using an image that sets the hostname
to 'ceph-builders'. Also, the hostname we give it is too long to use and
ansible silenty fails to set it.

This change ensures that nodes can use sudo correctly and avoids errors
like: 'sudo: unable to resolve host ceph-builders'.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ansible/examples/slave.yml

index b1d28b4e49a8d4f956b7586ee5d51dc89e571699..1067a1530bd7c8307ee4ef639b4b72c0002b69e6 100644 (file)
         backup: yes
         dest: /etc/hosts
         regexp: '^(127\.0\.1\.1(?!.*\b{{ ansible_hostname }}\b).*)$'
-        replace: '\1 {{ ansible_hostname }}'
+        replace: '\1 {{ ansible_hostname }} ceph-builders'
 
     - name: ensure that 127.0.1.1 is present with an actual hostname
       sudo: true
       lineinfile:
         dest: /etc/hosts
         regexp: '^(127\.0\.1\.1(?!.*\b{{ ansible_hostname }}\b).*)$'
-        line: '127.0.1.1 {{ ansible_hostname }}'
+        line: '127.0.1.1 {{ ansible_hostname }} ceph-builders'
 
     - name: install six, latest one
       sudo: true