kolla-ansible/ansible/roles/etcd/tasks/config.yml
Mark Goddard ee7a29cf00 Remove compute hosts from etcd group
Since I701d495675178c3ed8ec1f00b31d09f198b38a6f merged, etcd only runs
on the control hosts, not the compute hosts. We therefore no longer
require the etcd group to include the compute hosts.

Since the group mapping is now static, we can remove the use of
host_in_groups from the etcd service, in favour of the simpler method of
specifying the group.

Change-Id: Id8f888d7321a30a85ff95e742f7e6c8e2b9c696f
Related-Bug: #1790415
2018-09-04 19:23:18 +01:00

47 lines
1.3 KiB
YAML

---
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item.key }}"
state: "directory"
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ etcd_services }}"
- name: Copying over config.json files for services
template:
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: etcd_config_jsons
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ etcd_services }}"
notify:
- Restart etcd container
- name: Check etcd containers
become: true
kolla_docker:
action: "compare_container"
common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
environment: "{{ item.value.environment }}"
register: check_etcd_containers
when:
- kolla_action != "config"
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ etcd_services }}"
notify:
- Restart etcd container