From 8b52efc9ccc1aa417764be2fb09cbdf599fbe53a Mon Sep 17 00:00:00 2001 From: Steve Brasier Date: Thu, 22 Feb 2024 16:38:24 +0000 Subject: [PATCH] move host/image name output to hook --- ansible/fatimage.yml | 7 ------- environments/.stackhpc/hooks/pre.yml | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ansible/fatimage.yml b/ansible/fatimage.yml index 658d24d44..2df851470 100644 --- a/ansible/fatimage.yml +++ b/ansible/fatimage.yml @@ -1,12 +1,5 @@ # Builder version of site.yml just installing binaries -- hosts: builder - become: no - gather_facts: no - tasks: - - name: Report hostname (= final image name) - command: hostname - - name: Run pre.yml hook vars: appliances_environment_root: "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}" diff --git a/environments/.stackhpc/hooks/pre.yml b/environments/.stackhpc/hooks/pre.yml index 65dfad72d..a2927aea9 100644 --- a/environments/.stackhpc/hooks/pre.yml +++ b/environments/.stackhpc/hooks/pre.yml @@ -1,3 +1,10 @@ +- hosts: builder + become: no + gather_facts: no + tasks: + - name: Report hostname (= final image name) + command: hostname + - hosts: control:!builder become: yes gather_facts: false