]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: Set hostname on OpenSUSE wip-no-hostname 1481/head
authorDavid Galloway <dgallowa@redhat.com>
Mon, 13 Jan 2020 23:35:09 +0000 (18:35 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Tue, 14 Jan 2020 14:24:40 +0000 (09:24 -0500)
Now that we're using system-provided ansible packages (https://github.com/ceph/mita/pull/135), we're at the mercy of the version provided.

OpenSUSE Leap 15.1 gives us ansible 2.8.1 which has this bug: https://github.com/ansible/ansible/issues/42726

Signed-off-by: David Galloway <dgallowa@redhat.com>
ansible/examples/slave.yml
ansible/examples/slave_static.yml

index cf9b0ab718ad98702d9476ad1463eea88fa4c87d..062a6ac9bf16bdb4d3a20fac7cf33f5e834dfc1c 100644 (file)
     - name: Set Hostname with hostname command
       hostname:
         name: "ceph-builders"
+      when: ansible_os_family != "Suse"
+
+    # https://github.com/ansible/ansible/issues/42726
+    - name: Set Hostname on OpenSUSE Leap
+      command: 'hostname ceph-builders'
+      when: ansible_os_family == "Suse"
 
     - name: ensure that 127.0.1.1 is present with an actual hostname
       lineinfile:
index b548f98748dc4b028980f92756c55f5a6ec61e8e..36d286a9bc4612ecdd97aa0e0780f3987884e342 100644 (file)
       become: yes
       hostname:
         name: "{{ ansible_hostname }}"
+      when: ansible_os_family != "Suse"
+
+    # https://github.com/ansible/ansible/issues/42726
+    - name: Set Hostname on OpenSUSE Leap
+      command: 'hostname ceph-builders'
+      when: ansible_os_family == "Suse"
 
     - name: ensure that the current host is in /etc/hosts. Yes this is a thing.
       become: true