From 26da379c3a5c88dda5f30adf9fd39d4254a9cc10 Mon Sep 17 00:00:00 2001 From: "Dave Wilde (d34dh0r53)" Date: Wed, 2 Jun 2021 12:40:42 -0500 Subject: [PATCH] Remove use of ansible_fqdn The ansible_fqdn fact is no longer passed into the individual roles in order to speed up deployments [0]. This changes alters the role to use ansible_facts['fqdn'] which is the same. * Updated tox.ini to include requirements.txt as well * Updated tox.ini to skip no-changed-when error [0]: https://bugs.launchpad.net/tripleo/+bug/1915761 Related-Bug: 1915761 Change-Id: I1314b0e39c4a36740c8ef0c867bbc6fe60409289 --- tasks/main.yaml | 6 +++--- tox.ini | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tasks/main.yaml b/tasks/main.yaml index c0fd359..d813336 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -28,15 +28,15 @@ - name: set client facts for fqdn set_fact: - client_name: "{{ ansible_fqdn }}" + client_name: "{{ ansible_facts['fqdn'] }}" client_reg_opt: "-hostname" - client_host: "{{ ansible_fqdn }}" + client_host: "{{ ansible_facts['fqdn'] }}" client_cert_cn: "{{ inventory_hostname }}" when: lunasa_client_ip is undefined - name: set client facts for IP override set_fact: - client_name: "{{ ansible_fqdn }}" + client_name: "{{ ansible_facts['fqdn'] }}" client_reg_opt: "-ip" client_host: "{{ lunasa_client_ip }}" client_cert_cn: "{{ lunasa_client_ip }}" diff --git a/tox.ini b/tox.ini index 66791da..dfd6b24 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,8 @@ skipsdist = true [testenv] basepython = python3 -deps = -r{toxinidir}/test-requirements.txt +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt [testenv:linters] # We ignore 106 because the role name is inferred from the directory name as @@ -13,4 +14,4 @@ deps = -r{toxinidir}/test-requirements.txt # (see setup.cfg). We would need to rename the repository to fix this without # ignoring it. # TODO(redrobot): Don't ignore 301 -commands = ansible-lint -x 106,301 {toxinidir} +commands = ansible-lint -x 106,301,no-changed-when {toxinidir}