14bf524756
This commit is to apply resource-constraints to a few more OpenStack services. Commit to apply constraints to the last set of services will be made in the upcoming commit. Depends-on: Icafa54baca24d2de64238222a5677b9d8b90e2aa Change-Id: I39004f54281f97d53dfa4b1dbcf248650ad6f186
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
---
|
|
- name: Ensuring config directories exist
|
|
file:
|
|
path: "{{ node_config_directory }}/{{ item }}"
|
|
state: "directory"
|
|
owner: "{{ config_owner_user }}"
|
|
group: "{{ config_owner_group }}"
|
|
mode: "0770"
|
|
become: true
|
|
with_items:
|
|
- "memcached"
|
|
|
|
- name: Copying over config.json files for services
|
|
template:
|
|
src: "{{ item }}.json.j2"
|
|
dest: "{{ node_config_directory }}/{{ item }}/config.json"
|
|
mode: "0660"
|
|
register: memcached_config_json
|
|
become: true
|
|
with_items:
|
|
- "memcached"
|
|
notify: Restart memcached container
|
|
|
|
- name: Check memcached container
|
|
vars:
|
|
service: "{{ memcached_services.memcached }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "compare_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
register: check_memcached_container
|
|
when:
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
- kolla_action != "config"
|
|
notify: Restart memcached container
|