Merge pull request #2110 from fultonj/issue/2092

Make acls and mode parameters of opentack_keys optional
pull/2117/head
Guillaume Abrioux 2017-10-26 15:28:35 +02:00 committed by GitHub
commit 787e54f73d
2 changed files with 18 additions and 18 deletions

View File

@ -70,6 +70,15 @@
docker_exec_client_cmd: docker_exec_client_cmd:
when: docker_exec_client_cmd == 'ceph' when: docker_exec_client_cmd == 'ceph'
- name: chmod key(s)
file:
path: "/etc/ceph/{{ cluster }}.{{ item.name }}.keyring"
mode: "{{ item.mode|default(omit) }}" # if mode not in list, uses mode from ps umask
with_items: "{{ keys }}"
when:
- cephx
- keys | length > 0
- name: setfacl for key(s) - name: setfacl for key(s)
acl: acl:
path: "/etc/ceph/{{ cluster }}.{{ item.0.name }}.keyring" path: "/etc/ceph/{{ cluster }}.{{ item.0.name }}.keyring"
@ -82,12 +91,3 @@
when: when:
- cephx - cephx
- keys | length > 0 - keys | length > 0
- name: chmod key(s)
file:
path: "/etc/ceph/{{ cluster }}.{{ item.name }}.keyring"
mode: "{{ item.mode }}"
with_items: "{{ keys }}"
when:
- cephx
- keys | length > 0

View File

@ -50,6 +50,15 @@
- openstack_config - openstack_config
- item.0 != groups[mon_group_name] | last - item.0 != groups[mon_group_name] | last
- name: chmod openstack key(s)
file:
path: "/etc/ceph/{{ cluster }}.{{ item.name }}.keyring"
mode: "{{ item.mode|default(omit) }}" # if mode not in list, uses mode from ps umask
with_items: "{{ openstack_keys }}"
when:
- openstack_config
- cephx
- name: setfacl for openstack key(s) - name: setfacl for openstack key(s)
acl: acl:
path: "/etc/ceph/{{ cluster }}.{{ item.0.name }}.keyring" path: "/etc/ceph/{{ cluster }}.{{ item.0.name }}.keyring"
@ -62,12 +71,3 @@
when: when:
- openstack_config - openstack_config
- cephx - cephx
- name: chmod openstack key(s)
file:
path: "/etc/ceph/{{ cluster }}.{{ item.name }}.keyring"
mode: "{{ item.mode }}"
with_items: "{{ openstack_keys }}"
when:
- openstack_config
- cephx