Simplify zuul playbooks

Based on how our inventory file is defined now, we can rework the
playbook process here and save some time.

Change-Id: I0852b3cd6b49c7ac57e1db2c1f3114d563515d84
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-12-18 16:13:23 -05:00
parent e34fc20382
commit 3e7acd2f30
6 changed files with 49 additions and 72 deletions

View File

@ -15,27 +15,6 @@
- name: Install zuul-executor
hosts: zuul-executor
tasks:
- name: Setup openstack.zuul role
include_role:
name: openstack.zuul
# TODO(pabelanger): I'm thinking we should likely create
# ansible-role-bubblewrap to allow user to better manage this dependency.
- name: Ensure bubblewrap is installed
become: true
package:
name: bubblewrap
state: installed
- name: Setup openstack.ssh role
include_role:
name: openstack.ssh
- name: Setup openstack.logrotate role
include_role:
name: openstack.logrotate
post_tasks:
- name: Run zuul-executor validation
include_role:

View File

@ -12,19 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Install zuul-fingergw.
- name: Install zuul-fingergw
hosts: zuul-fingergw
tasks:
- name: Setup openstack.zuul role.
include_role:
name: openstack.zuul
- name: Setup openstack.logrotate role.
include_role:
name: openstack.logrotate
post_tasks:
- name: Run zuul-fingergw validation.
- name: Run zuul-fingergw validation
include_role:
name: test.zuul-fingergw

View File

@ -12,19 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Install zuul-merger.
- name: Install zuul-merger
hosts: zuul-merger
tasks:
- name: Setup openstack.zuul role.
include_role:
name: openstack.zuul
- name: Setup openstack.logrotate role.
include_role:
name: openstack.logrotate
post_tasks:
- name: Run zuul-merger validation.
- name: Run zuul-merger validation
include_role:
name: test.zuul-merger

View File

@ -12,23 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Install zuul-scheduler.
- name: Install zuul-scheduler
hosts: zuul-scheduler
tasks:
- name: Setup openstack.ssh role.
include_role:
name: openstack.ssh
- name: Setup openstack.zuul role.
include_role:
name: openstack.zuul
- name: Setup openstack.logrotate role.
include_role:
name: openstack.logrotate
post_tasks:
- name: Run zuul-scheduler validation.
- name: Run zuul-scheduler validation
include_role:
name: test.zuul-scheduler

View File

@ -12,19 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Install zuul-web.
- name: Install zuul-web
hosts: zuul-web
tasks:
- name: Setup openstack.zuul role.
include_role:
name: openstack.zuul
- name: Setup openstack.logrotate role.
include_role:
name: openstack.logrotate
post_tasks:
- name: Run zuul-web validation.
- name: Run zuul-web validation
include_role:
name: test.zuul-web

View File

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Install zuul
hosts: zuul
- name: Bootstrap zuul-executor and zuul-scheduler
hosts: zuul-executor, zuul-scheduler
# TODO(pabelanger): We really don't want to use serial here, but this allows
# us to still support a single node install. What we should do here is expose
# some sort of variable to only toggle this when we are doing a single node
@ -23,13 +23,51 @@
tasks:
# NOTE(pabelanger): Because of ordering issues create the required home
# directory first.
- name: Create zuul user directories.
- name: Create zuul user directories
include_role:
name: openstack.zuul
vars:
zuul_task_manager:
- pre
- name: Setup openstack.ssh role
include_role:
name: openstack.ssh
- name: Bootstrap zuul-executor
hosts: zuul-executor
# TODO(pabelanger): We really don't want to use serial here, but this allows
# us to still support a single node install. What we should do here is expose
# some sort of variable to only toggle this when we are doing a single node
# install. Otherwise, we just slow down multinode deployments.
serial: 1
tasks:
# TODO(pabelanger): I'm thinking we should likely create
# ansible-role-bubblewrap to allow user to better manage this dependency.
- name: Ensure bubblewrap is installed
become: true
package:
name: bubblewrap
state: installed
- name: Install zuul
hosts: zuul
# TODO(pabelanger): We really don't want to use serial here, but this allows
# us to still support a single node install. What we should do here is expose
# some sort of variable to only toggle this when we are doing a single node
# install. Otherwise, we just slow down multinode deployments.
serial: 1
tasks:
- name: Setup openstack.zuul role
include_role:
name: openstack.zuul
- name: Setup openstack.logrotate role.
include_role:
name: openstack.logrotate
- import_playbook: zuul-scheduler.yaml
- import_playbook: zuul-executor.yaml
- import_playbook: zuul-fingergw.yaml