-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathmain.yml
More file actions
58 lines (53 loc) · 1.71 KB
/
Copy pathmain.yml
File metadata and controls
58 lines (53 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
- name: Create config directory.
become: yes
file:
path: "{{ vendordata_config_path }}"
state: directory
- name: Create vendordata conf.
become: yes
template:
src: "vendordata.conf.j2"
mode: 0640
dest: "{{ vendordata_config_path }}/vendordata.conf"
notify:
- restart vendordata service
- name: Create OpenStack user for service user.
become: True
kolla_toolbox:
container_engine: "{{ kolla_container_engine }}"
module_name: os_user
module_args:
auth: "{{ openstack_auth }}"
name: "{{ instance_metrics_writer_username }}"
password: "{{ instance_metrics_writer_password }}"
domain: default
run_once: True
delegate_to: "{{ groups['control'][0] }}"
- name: download vendordata container
block:
- name: Pull Docker image
community.general.docker_image:
source: pull
name: "{{ vendordata_services.vendordata_api.image }}"
force_source: yes
become: True
when:
- inventory_hostname in groups["vendordata"]
- name: Configure vendordata services.
include_role:
name: chameleon.docker_service
vars:
service_name: "{{ item.key }}"
service_bind_address: "{{ item.value.bind_address|default(api_interface_address) }}"
docker_image: "{{ item.value.image }}"
docker_network: "{{ item.value.network|default('bridge') }}"
docker_environment: "{{ item.value.environment|default({}) }}"
docker_mounts: "{{ item.value.mounts|default([]) }}"
docker_ports: "{{ item.value.ports|default([]) }}"
docker_command: "{{ item.value.command|default('') }}"
loop: "{{ vendordata_services|dict2items }}"
loop_control:
label: "{{ item.key }}"
when:
- inventory_hostname in groups[item.value.group]