1979d6b160
This deploys the nodepool-builder container and verifies it has started in testinfra. Change-Id: I8a717d06f1291a4112b2753641ff88f074cf0b31
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
- name: Add the nodepool group
|
|
group:
|
|
name: nodepool
|
|
state: present
|
|
gid: '{{ nodepool_base_nodepool_gid }}'
|
|
|
|
- name: Add the nodepool user
|
|
user:
|
|
name: nodepool
|
|
group: nodepool
|
|
home: /home/nodepool
|
|
create_home: yes
|
|
shell: /bin/bash
|
|
uid: '{{ nodepool_base_nodepool_uid }}'
|
|
|
|
- name: Install zookeeper
|
|
include_role:
|
|
name: install-zookeeper
|
|
when: nodepool_base_install_zookeeper
|
|
|
|
# NOTE(ianw) : A note on testing; we have some configurations for
|
|
# system-config-run-nodepool test hosts committed to project-config.
|
|
# Since this is a protected repo we can't speculatively test, which is
|
|
# why we're just cloning from opendev.org master and not a local
|
|
# checkout here. We don't expect the configs to change so this is OK.
|
|
- name: Clone the project-config repo for configs
|
|
git:
|
|
repo: 'https://opendev.org/openstack/project-config'
|
|
dest: /opt/project-config
|
|
force: yes
|
|
|
|
- name: Create nodepool config dir
|
|
file:
|
|
name: /etc/nodepool
|
|
state: directory
|
|
owner: nodepool
|
|
group: nodepool
|
|
mode: 0755
|
|
|
|
- name: Look for a host specific config file
|
|
stat:
|
|
path: /opt/project-config/nodepool/{{ inventory_hostname }}.yaml
|
|
register: host_config_file
|
|
|
|
- name: Set config file symlink
|
|
file:
|
|
state: link
|
|
src: '{{ host_config_file.stat.exists | ternary(host_config_file.stat.path, "/opt/project-config/nodepool/nodepool.yaml") }}'
|
|
dest: /etc/nodepool/nodepool.yaml
|
|
|
|
- name: Symlink in elements from project-config repo
|
|
file:
|
|
state: link
|
|
src: /opt/project-config/nodepool/elements
|
|
dest: /etc/nodepool/elements |