From 7cd6fd60c34c4ea1627584e15f3e36da1d54efe4 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 13 Aug 2018 12:37:19 -0400 Subject: [PATCH] Promote test-emit-job-header change We can remove test-emit-job-header and move our output node info into emit-job-header now that it has been tested with 2 zuuls. http://logs.openstack.org/53/591453/2/check/tox-py35/f9b4f5f/job-output.txt.gz#_2018-08-13_16_27_00_560529 https://logs.rdoproject.org/15/15415/4/check/tox-docs/2ce861f/job-output.txt.gz#_2018-08-10_15_59_21_231353 Change-Id: Ic7685f2fa9b8dd34a4a46c23ba46e21bc6ab155f Signed-off-by: Paul Belanger --- roles/emit-job-header/tasks/main.yaml | 12 ++++++++ roles/test-emit-job-header/README.rst | 7 ----- roles/test-emit-job-header/tasks/main.yaml | 33 ---------------------- 3 files changed, 12 insertions(+), 40 deletions(-) delete mode 100644 roles/test-emit-job-header/README.rst delete mode 100644 roles/test-emit-job-header/tasks/main.yaml diff --git a/roles/emit-job-header/tasks/main.yaml b/roles/emit-job-header/tasks/main.yaml index 7d08bf666..a2d8b70aa 100644 --- a/roles/emit-job-header/tasks/main.yaml +++ b/roles/emit-job-header/tasks/main.yaml @@ -19,3 +19,15 @@ {% if zuul_log_url is defined and zuul_log_path is defined %} Log URL (when completed): {{ zuul_log_url }}/{{ zuul_log_path }} {% endif %} + + - name: Print node information + debug: + msg: | + # Node Information + Hostname: {{ hostvars[item]['ansible_hostname'] }} + Provider: {{ hostvars[item]['nodepool']['provider'] }} + Label: {{ hostvars[item]['nodepool']['label'] }} + {% if hostvars[item]['nodepool']['interface_ip'] is defined %} + Interface IP: {{ hostvars[item]['nodepool']['interface_ip'] }} + {% endif %} + loop: "{{ query('inventory_hostnames', 'all,!localhost') }}" diff --git a/roles/test-emit-job-header/README.rst b/roles/test-emit-job-header/README.rst deleted file mode 100644 index bdb97c7ed..000000000 --- a/roles/test-emit-job-header/README.rst +++ /dev/null @@ -1,7 +0,0 @@ -Log a few lines about the job. - -**Role Variables** - -.. zuul:rolevar:: zuul_log_url - - Base URL where logs are to be found. diff --git a/roles/test-emit-job-header/tasks/main.yaml b/roles/test-emit-job-header/tasks/main.yaml deleted file mode 100644 index a2d8b70aa..000000000 --- a/roles/test-emit-job-header/tasks/main.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# We don't want this to run for every host, it should only run once. -- run_once: yes - block: - - name: Setup log path fact - include_role: - name: set-zuul-log-path-fact - - - name: Print job information - debug: - msg: | - # Job Information - Ansible Version: {{ ansible_version['full'] }} - Job: {{ zuul.job }} - Pipeline: {{ zuul.pipeline }} - Executor: {{ zuul.executor.hostname }} - {% if zuul.change_url is defined %} - Triggered by: {{ zuul.change_url }} - {% endif %} - {% if zuul_log_url is defined and zuul_log_path is defined %} - Log URL (when completed): {{ zuul_log_url }}/{{ zuul_log_path }} - {% endif %} - - - name: Print node information - debug: - msg: | - # Node Information - Hostname: {{ hostvars[item]['ansible_hostname'] }} - Provider: {{ hostvars[item]['nodepool']['provider'] }} - Label: {{ hostvars[item]['nodepool']['label'] }} - {% if hostvars[item]['nodepool']['interface_ip'] is defined %} - Interface IP: {{ hostvars[item]['nodepool']['interface_ip'] }} - {% endif %} - loop: "{{ query('inventory_hostnames', 'all,!localhost') }}"