
We use project-config for gerrit, gitea and nodepool config. That's cool, because can clone that from zuul too and make sure that each prod run we're doing runs with the contents of the patch in question. Introduce a flag file that can be touched in /home/zuulcd that will block zuul from running prod playbooks. By default, if the file is there, zuul will wait for an hour before giving up. Rename zuulcd to zuul To better align prod and test, name the zuul user zuul. Change-Id: I83c38c9c430218059579f3763e02d6b9f40c7b89
49 lines
1.1 KiB
YAML
49 lines
1.1 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
|
|
|
|
- name: Sync project-config
|
|
include_role:
|
|
name: sync-project-config
|
|
|
|
- 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
|