From 2eee43e627034b0d7f8d129a10cdba95ef57e937 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 7 Sep 2018 10:51:56 -0700 Subject: [PATCH] Name plays in playbooks In run_all, we start a bunch of plays in sequence, but it's difficult to tell what they're doing until you see the tasks. Name the plays themselves to produce a better narrative structure. Change-Id: I0597eab2c06c6963601dec689714c38101a4d470 --- playbooks/base.yaml | 6 ++++++ playbooks/bridge.yaml | 1 + playbooks/remote_puppet_afs.yaml | 1 + playbooks/remote_puppet_else.yaml | 1 + playbooks/remote_puppet_git.yaml | 8 ++++---- playbooks/run_cloud_launcher.yaml | 4 ++-- playbooks/update-system-config.yaml | 3 +-- playbooks/update_puppet_version.yaml | 1 + 8 files changed, 17 insertions(+), 8 deletions(-) diff --git a/playbooks/base.yaml b/playbooks/base.yaml index 7e011bb300..cbbde879f0 100644 --- a/playbooks/base.yaml +++ b/playbooks/base.yaml @@ -1,4 +1,5 @@ - hosts: "!disabled" + name: "Base: set up users and base package repositories on all hosts" roles: - users - base-repos @@ -6,12 +7,14 @@ # Run base-server seperately so that the update apt cache handler in base-repos # fires before we run base-server - hosts: "!disabled" + name: "Base: set up common environment on all hosts" roles: - base-server - timezone - unbound - hosts: bridge.openstack.org:!disabled + name: "Base: configure OpenStackSDK on bridge" tasks: - include_role: name: configure-openstacksdk @@ -24,17 +27,20 @@ openstacksdk_config_template: clouds/bridge_clouds.yaml.j2 - hosts: nodepool-launcher:nodepool-builder:!disabled + name: "Base: configure OpenStackSDK on nodepool" strategy: free roles: - minimal-nodepool - configure-openstacksdk - hosts: "puppet:!disabled" + name: "Base: install and configure puppet on puppet hosts" roles: - puppet-install - disable-puppet-agent - hosts: "!ci-backup:!disabled" + name: "Base: set up common environment on all hosts (except backup)" roles: - exim - iptables diff --git a/playbooks/bridge.yaml b/playbooks/bridge.yaml index 75f4758a30..50614f3247 100644 --- a/playbooks/bridge.yaml +++ b/playbooks/bridge.yaml @@ -1,4 +1,5 @@ - hosts: bridge.openstack.org + name: "Bridge: configure the bastion host" become: true roles: - pip3 diff --git a/playbooks/remote_puppet_afs.yaml b/playbooks/remote_puppet_afs.yaml index 64d4270989..1aac92a3ed 100644 --- a/playbooks/remote_puppet_afs.yaml +++ b/playbooks/remote_puppet_afs.yaml @@ -1,4 +1,5 @@ - hosts: "afs:afsdb:!disabled" + name: "AFS: run puppet on the AFS servers" strategy: free roles: - puppet diff --git a/playbooks/remote_puppet_else.yaml b/playbooks/remote_puppet_else.yaml index 9e30834783..32a4547c66 100644 --- a/playbooks/remote_puppet_else.yaml +++ b/playbooks/remote_puppet_else.yaml @@ -1,4 +1,5 @@ - hosts: 'puppet:!review:!git-server:!zuul-scheduler:!afs:!afsdb:!puppetmaster*:!disabled' + name: "Puppet-else: run puppet on all other servers" strategy: free roles: - puppet diff --git a/playbooks/remote_puppet_git.yaml b/playbooks/remote_puppet_git.yaml index 5ebb0ae6bc..88980fd4e8 100644 --- a/playbooks/remote_puppet_git.yaml +++ b/playbooks/remote_puppet_git.yaml @@ -1,8 +1,8 @@ - hosts: "localhost:!disabled" + name: "Puppet-git: Collect the project-config ref" strategy: free connection: local tasks: - # Note that git module does ls-remote if clone is set to no and places # the remote_head value in returndict.after - name: Grab project-config repo info @@ -12,29 +12,29 @@ register: gitinfo - hosts: "git-server:!disabled" + name: "Puppet-git: Run puppet on the git servers" strategy: free max_fail_percentage: 1 roles: - - role: puppet facts: project_config_ref: "{{ hostvars.localhost.gitinfo.after }}" - hosts: "review:!disabled" + name: "Puppet-git: Run puppet on the Gerrit server" strategy: free gather_facts: true roles: - - role: puppet facts: project_config_ref: "{{ hostvars.localhost.gitinfo.after }}" puppet_timeout: 60m - hosts: "zuul-scheduler:!disabled" + name: "Puppet-git: Run puppet on the Zuul scheduler" strategy: free gather_facts: true roles: - - role: puppet facts: project_config_ref: "{{ hostvars.localhost.gitinfo.after }}" diff --git a/playbooks/run_cloud_launcher.yaml b/playbooks/run_cloud_launcher.yaml index 0f8c7f6f74..90d371325e 100644 --- a/playbooks/run_cloud_launcher.yaml +++ b/playbooks/run_cloud_launcher.yaml @@ -1,6 +1,6 @@ ---- - hosts: localhost + name: "Cloud-launcher: Run cloud launcher" connection: local gather_facts: false roles: - - { role: cloud-launcher } + - cloud-launcher diff --git a/playbooks/update-system-config.yaml b/playbooks/update-system-config.yaml index 65d12aea40..0a1483323e 100644 --- a/playbooks/update-system-config.yaml +++ b/playbooks/update-system-config.yaml @@ -1,9 +1,8 @@ ---- - hosts: "localhost:!disabled" + name: "System-config: Update the system-config repo on bridge" connection: local gather_facts: false tasks: - - name: Make sure system-config repo is up to date git: repo: https://git.openstack.org/openstack-infra/system-config diff --git a/playbooks/update_puppet_version.yaml b/playbooks/update_puppet_version.yaml index c80cfff524..f52b49d1be 100644 --- a/playbooks/update_puppet_version.yaml +++ b/playbooks/update_puppet_version.yaml @@ -1,4 +1,5 @@ - hosts: 'puppet4' + name: "Puppet-version: install puppet-4 on puppet-4 hosts" gather_facts: false tasks: - git: