kolla-ansible/ansible/roles/ceph/tasks/config.yml
Duong Ha-Quang 9965cc46ff Specify 'become' for only neccesary tasks (all other roles)
Add become to only neccesary tasks in roles:

- aodh
- barbican
- bifrost
- ceilometer
- ceph
- chrony
- cinder
- cloudkitty
- collectd
- congress
- designate
- elasticsearch
- etcd
- freezer
- gnocchi
- grafana
- influxdb
- ironic
- iscsi
- karbor
- kibana
- kuryr
- magnum
- manila
- mistral
- mongodb
- multipathd
- murano
- octavia
- panko
- qdrouterd
- rally
- sahara
- searchlight
- senlin
- skydive
- solum
- swift
- swift
- tacker
- telegraf
- tempest
- trove
- vmtp
- watcher
- zun

Change-Id: I6e32d94d4172dd96d09d8609e8a5221ab5586a31
Partial-Implements: blueprint ansible-specific-task-become
2018-03-12 09:37:43 +07:00

58 lines
1.3 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:
- "ceph-mon"
- "ceph-osd"
- "ceph-rgw"
- "ceph-mgr"
- "ceph-mds"
- "ceph-nfs"
- name: Copying over config.json files for services
template:
src: "{{ item.name }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.name }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.group]
with_items:
- name: "ceph-mon"
group: ceph-mon
- name: "ceph-osd"
group: ceph-osd
- name: "ceph-rgw"
group: ceph-rgw
- name: "ceph-mgr"
group: ceph-mgr
- name: "ceph-mds"
group: ceph-mds
- name: "ceph-nfs"
group: ceph-nfs
- name: Copying over ceph.conf
vars:
service_name: "{{ item }}"
merge_configs:
sources:
- "{{ role_path }}/templates/ceph.conf.j2"
- "{{ node_custom_config }}/ceph.conf"
- "{{ node_custom_config }}/ceph/{{ inventory_hostname }}/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
mode: "0660"
become: true
with_items:
- "ceph-mon"
- "ceph-osd"
- "ceph-rgw"
- "ceph-mgr"
- "ceph-mds"
- "ceph-nfs"