From 533e9ca912e882578b4a413ab96399f80b4da0fb Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 8 Jul 2021 11:08:36 +0100 Subject: [PATCH] Fix --check argument for overcloud host configure When running 'kayobe overcloud host configure', there are some tasks that we need to run even in check mode, to ensure that subsequent tasks can execute. These tasks should not change the target systems. Change-Id: Id912ccd7c4bf2a4ccff8d16f2a9aa6ed2127a335 Story: 2004798 Task: 28951 --- ansible/kayobe-ansible-user.yml | 1 + ansible/roles/disable-glean/tasks/main.yml | 1 + releasenotes/notes/fix-check-mode-c0f8e1fcb09f730b.yaml | 6 ++++++ 3 files changed, 8 insertions(+) create mode 100644 releasenotes/notes/fix-check-mode-c0f8e1fcb09f730b.yaml diff --git a/ansible/kayobe-ansible-user.yml b/ansible/kayobe-ansible-user.yml index 68f716088..b09242778 100644 --- a/ansible/kayobe-ansible-user.yml +++ b/ansible/kayobe-ansible-user.yml @@ -17,6 +17,7 @@ module: command ssh -o BatchMode=yes -p {{ ssh_port }} {{ ssh_user }}@{{ ssh_host }} hostname failed_when: false changed_when: false + check_mode: no register: ssh_result vars: ssh_user: "{{ ansible_user }}" diff --git a/ansible/roles/disable-glean/tasks/main.yml b/ansible/roles/disable-glean/tasks/main.yml index 43f129fe4..cf66dce7a 100644 --- a/ansible/roles/disable-glean/tasks/main.yml +++ b/ansible/roles/disable-glean/tasks/main.yml @@ -3,6 +3,7 @@ command: systemctl list-units glean*.service --no-legend --no-pager --state=loaded register: glean_services changed_when: False + check_mode: no - name: Ensure Glean services are stopped and disabled service: diff --git a/releasenotes/notes/fix-check-mode-c0f8e1fcb09f730b.yaml b/releasenotes/notes/fix-check-mode-c0f8e1fcb09f730b.yaml new file mode 100644 index 000000000..259920ee8 --- /dev/null +++ b/releasenotes/notes/fix-check-mode-c0f8e1fcb09f730b.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes some issues seen when using the ``--check`` argument with ``kayobe + overcloud host configure``. See `story 2004798 + `__.