]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: use 'inventory_hostname' to look up jenkins labels
authorDan Mick <dmick@redhat.com>
Wed, 19 Jul 2023 20:31:31 +0000 (13:31 -0700)
committerDan Mick <dmick@redhat.com>
Wed, 9 Aug 2023 22:25:54 +0000 (15:25 -0700)
inventory_hostname is as it appears in the inventory file, and keeping
that consistent is easier than dealing with short vs long names
Note: this requires a change to ceph-sepia-secrets to standardize on
the inventory form of the name

Signed-off-by: Dan Mick <dmick@redhat.com>
ansible/examples/builder.yml

index 251d0375f42874afc15723d9459362cd733f3684..4aad008579c36913d9f57ecd1278a888d528d3e1 100644 (file)
@@ -17,7 +17,7 @@
     - api_uri: 'https://jenkins.ceph.com'
     - jenkins_credentials_uuid: 'jenkins-build'
     - nodename: '{{ nodename }}'
-    - labels: "{{ jenkins_labels[ansible_hostname] }}"
+    - labels: "{{ jenkins_labels[inventory_hostname] }}"
     - grant_sudo: true
     - osc_user: 'username'
     - osc_pass: 'password'