From 1b9326888e0b175abe0cd5c70aa8ad31431dc3e8 Mon Sep 17 00:00:00 2001 From: Rick Elrod Date: Tue, 20 Sep 2022 14:25:40 -0500 Subject: [PATCH] [proj signing] Fix error message, rename action (#12926) - Fix out of scope variable in error message in the action plugin - Rename action plugin from playbook_integrity to verify_project Refs #12887 which pointed out the out of scope variable Signed-off-by: Rick Elrod --- .../{playbook_integrity.py => verify_project.py} | 2 +- .../library/{playbook_integrity.py => verify_project.py} | 0 awx/playbooks/project_update.yml | 6 ++---- 3 files changed, 3 insertions(+), 5 deletions(-) rename awx/playbooks/action_plugins/{playbook_integrity.py => verify_project.py} (98%) rename awx/playbooks/library/{playbook_integrity.py => verify_project.py} (100%) diff --git a/awx/playbooks/action_plugins/playbook_integrity.py b/awx/playbooks/action_plugins/verify_project.py similarity index 98% rename from awx/playbooks/action_plugins/playbook_integrity.py rename to awx/playbooks/action_plugins/verify_project.py index e77e286c0d..0597d8b4b8 100644 --- a/awx/playbooks/action_plugins/playbook_integrity.py +++ b/awx/playbooks/action_plugins/verify_project.py @@ -88,7 +88,7 @@ class ActionModule(ActionBase): if not os.path.exists(manifest_file): return { "failed": True, - "msg": f"Expected file not found: {path}", + "msg": f"Expected file not found: {manifest_file}", } checksum_file_contents = open(manifest_file, "r").read() diff --git a/awx/playbooks/library/playbook_integrity.py b/awx/playbooks/library/verify_project.py similarity index 100% rename from awx/playbooks/library/playbook_integrity.py rename to awx/playbooks/library/verify_project.py diff --git a/awx/playbooks/project_update.yml b/awx/playbooks/project_update.yml index 2e5f8610c4..2067e76043 100644 --- a/awx/playbooks/project_update.yml +++ b/awx/playbooks/project_update.yml @@ -160,19 +160,17 @@ name: Perform project signature/checksum verification tasks: - name: Verify project content using GPG signature - playbook_integrity: + verify_project: project_path: "{{ project_path | quote }}" validation_type: gpg gpg_pubkey: "{{ gpg_pubkey }}" - register: gpg_result tags: - validation_gpg_public_key - name: Verify project content against checksum manifest - playbook_integrity: + verify_project: project_path: "{{ project_path | quote }}" validation_type: checksum_manifest - register: checksum_result tags: - validation_checksum_manifest