]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
iscsi: fix permission denied error
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 7 Feb 2019 13:16:13 +0000 (14:16 +0100)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Mon, 11 Feb 2019 16:17:44 +0000 (16:17 +0000)
commit6200f90ab21c3fe24d71cad652a94b1273873c17
tree9716544cbc85a70faddd0c3a7095582fd0b09883
parentbde156352b5b2c9441897748eee1e5de65f6754e
iscsi: fix permission denied error

Typical error:
```
fatal: [iscsi-gw0]: FAILED! =>
  msg: 'an error occurred while trying to read the file ''/home/guits/ceph-ansible/tests/functional/all_daemons/fetch/e5f4ab94-c099-4781-b592-dbd440a9d6f3/iscsi-gateway.key'': [Errno 13] Permission denied: b''/home/guits/ceph-ansible/tests/functional/all_daemons/fetch/e5f4ab94-c099-4781-b592-dbd440a9d6f3/iscsi-gateway.key'''
```

`become: True` is not needed on the following task:

`copy crt file(s) to gateway nodes`.

Since it's already set in the main playbook (site.yml/site-container.yml)

The thing is that the files get generated in the 'fetch_directory' with
root user because there is a 'delegate_to' + we run the playbook with
`become: True` (from main playbook).

The idea here is to create files under ansible user so we can open them
later to copy them on the remote machine.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 9d590f4339a4d758f07388bf97b7eabdcbca6043)
roles/ceph-iscsi-gw/tasks/deploy_ssl_keys.yml