mirror of https://github.com/ceph/ceph-ansible.git
ceph-mon: detect ANSIBLE_ROLES_PATH if present
Some deployments can't copy infrastructure playbooks outside of the infrastructure-playbooks directory. Thus they use ANSIBLE_ROLES_PATH to overcome this. However some roles have 'playbook_dir' hardcoded, which results in wrong path since the execution comes from infrastructure-playbooks. Basically the role triggered by a playbook from infrastructure-playbooks believes that the roles are in infrastructure-playbooks/roles. This commit fixes that. Signed-off-by: Sébastien Han <seb@redhat.com>pull/1808/head
parent
ac818f5bba
commit
76ac9b077b
|
@ -43,10 +43,10 @@
|
|||
- "{{ inventory_hostname == groups[mon_group_name] | last }}"
|
||||
- not containerized_deployment_with_kv
|
||||
|
||||
- include: "{{ playbook_dir }}/roles/ceph-mon/tasks/set_osd_pool_default_pg_num.yml"
|
||||
- include: "{{ lookup('env', 'ANSIBLE_ROLES_PATH') | default (playbook_dir + '/roles', true) }}/ceph-mon/tasks/set_osd_pool_default_pg_num.yml"
|
||||
|
||||
# create openstack pools only when all mons are up.
|
||||
- include: "{{ playbook_dir }}/roles/ceph-mon/tasks/openstack_config.yml"
|
||||
- include: "{{ lookup('env', 'ANSIBLE_ROLES_PATH') | default (playbook_dir + '/roles', true) }}/ceph-mon/tasks/openstack_config.yml"
|
||||
when:
|
||||
- openstack_config
|
||||
- "{{ inventory_hostname == groups[mon_group_name] | last }}"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
- name: generate ganesha configuration file
|
||||
action: config_template
|
||||
args:
|
||||
src: "{{ playbook_dir }}/roles/ceph-common/templates/ganesha.conf.j2"
|
||||
src: "{{ lookup('env', 'ANSIBLE_ROLES_PATH') | default (playbook_dir + '/roles', true) }}/ceph-common/templates/ganesha.conf.j2"
|
||||
dest: /etc/ganesha/ganesha.conf
|
||||
owner: "root"
|
||||
group: "root"
|
||||
|
|
Loading…
Reference in New Issue