From 5dd32fc5011dfb317f01d3f3efa045436bd763ca Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Wed, 20 Jun 2018 23:53:26 +0200 Subject: [PATCH] Simplify group_names variable As noted in [1] the group_names variable is a top-level variable and doesn't need to be accessed via the hostvars object. [1] https://review.openstack.org/#/c/572861/1/playbooks/remote_puppet_adhoc.yaml Change-Id: Ic895f177019b31da34cdf91a6dd62dc99a649754 --- playbooks/remote_puppet_adhoc.yaml | 2 +- playbooks/remote_puppet_afs.yaml | 2 +- playbooks/remote_puppet_else.yaml | 2 +- playbooks/remote_puppet_git.yaml | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/playbooks/remote_puppet_adhoc.yaml b/playbooks/remote_puppet_adhoc.yaml index 7c1e182ac2..85394f60b8 100644 --- a/playbooks/remote_puppet_adhoc.yaml +++ b/playbooks/remote_puppet_adhoc.yaml @@ -5,4 +5,4 @@ - role: puppet manage_config: True puppet_reports: none - futureparser: "{{ True if 'futureparser' in hostvars[inventory_hostname].group_names else False }}" + futureparser: "{{ True if 'futureparser' in group_names else False }}" diff --git a/playbooks/remote_puppet_afs.yaml b/playbooks/remote_puppet_afs.yaml index 7b5cd2ea42..be9e96d332 100644 --- a/playbooks/remote_puppet_afs.yaml +++ b/playbooks/remote_puppet_afs.yaml @@ -6,4 +6,4 @@ - role: puppet manage_config: True puppet_reports: none - futureparser: "{{ True if 'futureparser' in hostvars[inventory_hostname].group_names else False }}" + futureparser: "{{ True if 'futureparser' in group_names else False }}" diff --git a/playbooks/remote_puppet_else.yaml b/playbooks/remote_puppet_else.yaml index 556dba807e..71266005d2 100644 --- a/playbooks/remote_puppet_else.yaml +++ b/playbooks/remote_puppet_else.yaml @@ -5,4 +5,4 @@ - role: puppet manage_config: True puppet_reports: none - futureparser: "{{ True if 'futureparser' in hostvars[inventory_hostname].group_names else False }}" + futureparser: "{{ True if 'futureparser' in group_names else False }}" diff --git a/playbooks/remote_puppet_git.yaml b/playbooks/remote_puppet_git.yaml index e42cac665d..139f8c797c 100644 --- a/playbooks/remote_puppet_git.yaml +++ b/playbooks/remote_puppet_git.yaml @@ -14,7 +14,7 @@ copy_puppet: False manage_config: True puppet_reports: none - futureparser: "{{ True if 'futureparser' in hostvars[inventory_hostname].group_names else False }}" + futureparser: "{{ True if 'futureparser' in group_names else False }}" - hosts: "git0*:!disabled" strategy: free gather_facts: true @@ -25,7 +25,7 @@ project_config_ref: "{{ hostvars.localhost.gitinfo.after }}" manage_config: True puppet_reports: none - futureparser: "{{ True if 'futureparser' in hostvars[inventory_hostname].group_names else False }}" + futureparser: "{{ True if 'futureparser' in group_names else False }}" - hosts: "review:!disabled" strategy: free gather_facts: true @@ -36,7 +36,7 @@ puppet_timeout: 60m manage_config: True puppet_reports: none - futureparser: "{{ True if 'futureparser' in hostvars[inventory_hostname].group_names else False }}" + futureparser: "{{ True if 'futureparser' in group_names else False }}" - hosts: "zuul-scheduler:!disabled" strategy: free gather_facts: true @@ -47,4 +47,4 @@ puppet_timeout: 60m manage_config: True puppet_reports: none - futureparser: "{{ True if 'futureparser' in hostvars[inventory_hostname].group_names else False }}" + futureparser: "{{ True if 'futureparser' in group_names else False }}"