ceph-ansible/roles
John Fulton d65cbaa539 Set permissions and ACLs of OpenStack keys on all ceph-mons
If ceph-ansible deploys a Ceph cluster with "openstack_config: true"
and sets the openstack_keys map to have certain ACLs or permissions,
the requested ACLs or permissions are only set on one of the monitor
nodes [2] when they should be set on all of them.

This patch solves [3] the above issue by having the chmod and setfacl
tasks iterate the list of mon nodes (including the mon node that the
task was delegated to) to apply the chmod of setfacl to the keys in
openstack_keys.

[1]
```
openstack_keys:
  - { name: client.openstack, key: "$(ceph-authtool --gen-print-key)", mon_cap: "allow r", osd_cap: "allow class-read object_prefix rbd_children, allow rwx pool=images, allow rwx pool=vms, allow rwx pool=volumes, allow rwx pool=backups", mode: "0600", acls: ["u:nova:r--", "u:cinder:r--", "u:glance:r--", "u:gnocchi:r--"] }
```
[2]
```
$ ansible mons -m shell -b -a "ls -l /etc/ceph/ceph.client.openstack.keyring ; getfacl /etc/ceph/ceph.client.openstack.keyring"
192.168.1.26 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov  3 20:30 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

192.168.1.29 | SUCCESS | rc=0 >>
-rw-r--r--. 1 root root 253 Nov  3 20:30 /etc/ceph/ceph.client.openstack.keyring
user::rw-
group::r--
other::r--getfacl: Removing leading '/' from absolute path names

192.168.1.23 | SUCCESS | rc=0 >>
-rw-r--r--. 1 root root 253 Nov  3 20:30 /etc/ceph/ceph.client.openstack.keyring
user::rw-
group::r--
other::r--getfacl: Removing leading '/' from absolute path names

$
```
[3]
```
(undercloud) [stack@hci-director ceph-ansible]$ ansible mons -m shell -b -a "ls -l /etc/ceph/ceph.client.openstack.keyring ; getfacl /etc/ceph/ceph.client.openstack.keyring"
192.168.1.25 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

192.168.1.29 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

192.168.1.27 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

(undercloud) [stack@hci-director ceph-ansible]$
```
2017-11-15 10:09:24 -05:00
..
ceph-agent Cleanup readme files in roles directories 2017-10-17 11:22:06 +02:00
ceph-client osd: enhance backward compatibility 2017-11-03 11:15:23 +01:00
ceph-common Merge pull request #2105 from major/really-fix-always-run 2017-10-27 09:33:47 +02:00
ceph-common-coreos Use check_mode instead of always_run 2017-10-25 09:53:34 -05:00
ceph-config config: fix config generation 2017-11-09 08:50:57 +01:00
ceph-defaults defaults: fix rgw restart script in handlers 2017-11-13 16:30:03 +01:00
ceph-docker-common osd: enhance backward compatibility 2017-11-03 11:15:23 +01:00
ceph-fetch-keys Use check_mode instead of always_run 2017-10-25 09:53:34 -05:00
ceph-iscsi-gw Use check_mode instead of always_run 2017-10-25 09:53:34 -05:00
ceph-mds Use check_mode instead of always_run 2017-10-25 09:53:34 -05:00
ceph-mgr Use check_mode instead of always_run 2017-10-25 09:53:34 -05:00
ceph-mon Set permissions and ACLs of OpenStack keys on all ceph-mons 2017-11-15 10:09:24 -05:00
ceph-nfs Include ganesha dbus config file 2017-10-31 08:30:12 +01:00
ceph-osd tests: remove OSD_FORCE_ZAP variable from tests 2017-11-14 17:55:01 +01:00
ceph-rbd-mirror Use check_mode instead of always_run 2017-10-25 09:53:34 -05:00
ceph-restapi Use check_mode instead of always_run 2017-10-25 09:53:34 -05:00
ceph-rgw config: fix config generation 2017-11-09 08:50:57 +01:00
ceph.ceph-common rollback previous change for ceph-common change 2016-03-02 18:44:36 +01:00
ceph.ceph-docker-common ceph-docker-common: add symlink to ceph.ceph-docker-common 2017-01-16 10:42:42 -06:00