Collapse nodepool plays to single file

We don't actually need different plays for these servers, we can just
group them differently.  This should save some time off job runs.

Change-Id: I5e7763e7b406569ed39f6bdd0e381eee1eaabee3
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-12-18 12:16:47 -05:00
parent ec7a464e2a
commit e34fc20382
3 changed files with 48 additions and 40 deletions

View File

@ -15,33 +15,6 @@
- name: Install nodepool-builder
hosts: nodepool-builder
tasks:
- name: Setup openstack.ssh role
include_role:
name: openstack.ssh
- name: Setup openstack.diskimage-builder role
include_role:
name: openstack.diskimage-builder
- name: Setup openstack.nodepool role
include_role:
name: openstack.nodepool
- name: Install nodepool elements directory
become: true
synchronize:
delete: true
dest: /etc/nodepool/
perms: true
rsync_opts:
- '--chown=nodepool:nodepool'
src: "{{ windmill_config_git_dest }}/nodepool/elements"
- name: Setup openstack.logrotate role
include_role:
name: openstack.logrotate
post_tasks:
- name: Run nodepool-server validation
include_role:

View File

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

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Install nodepool
- name: Bootstrap nodepool hosts
hosts: nodepool
# 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
@ -23,16 +23,60 @@
tasks:
# NOTE(pabelanger): Because of ordering issues create the required home
# directory first.
- name: Create nodepool user directories.
- name: Create nodepool user directories
include_role:
name: openstack.nodepool
vars:
nodepool_task_manager:
- pre
- name: Bootstrap nodepool-builder
hosts: nodepool-builder
# 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.ssh role
include_role:
name: openstack.ssh
- name: Setup openstack.diskimage-builder role
include_role:
name: openstack.diskimage-builder
- name: Install nodepool elements directory
become: true
synchronize:
delete: true
dest: /etc/nodepool/
perms: true
rsync_opts:
- '--chown=nodepool:nodepool'
src: "{{ windmill_config_git_dest }}/nodepool/elements"
- name: Bootstrap nodepool hosts
hosts: nodepool
# 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.openstacksdk role
include_role:
name: openstack.openstacksdk
- name: Setup openstack.nodepool role
include_role:
name: openstack.nodepool
- name: Setup openstack.logrotate role
include_role:
name: openstack.logrotate
- import_playbook: nodepool-builder.yaml
- import_playbook: nodepool-launcher.yaml