From 924fbb6f7a44f1b42a70f558578b2635c8b49d70 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Tue, 13 Sep 2016 13:30:25 +0200 Subject: [PATCH] Fix permissions of tmp files When running kolla-ansible as non-root users the tmp files will be created with become user as owner and mode 0600. This way the user running kolla-ansible is not able to read the generated files. This is necessary because of the use of the lookup method, which will not run as become user. TrivialFix Change-Id: If86d114c05a9b2e7fa240718611d78e93100ebdf --- ansible/roles/ceph/tasks/bootstrap_mons.yml | 4 ++-- ansible/roles/mariadb/tasks/lookup_cluster.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/roles/ceph/tasks/bootstrap_mons.yml b/ansible/roles/ceph/tasks/bootstrap_mons.yml index 2200c4f988..e145b0c3cf 100644 --- a/ansible/roles/ceph/tasks/bootstrap_mons.yml +++ b/ansible/roles/ceph/tasks/bootstrap_mons.yml @@ -6,7 +6,7 @@ run_once: True - name: Creating temp file on localhost - local_action: copy content=None dest=/tmp/kolla_ceph_cluster mode=0600 + local_action: copy content=None dest=/tmp/kolla_ceph_cluster mode=0644 changed_when: False always_run: True run_once: True @@ -19,7 +19,7 @@ register: ceph_mon_config_volume - name: Writing hostname of host with existing cluster files to temp file - local_action: copy content="{{ inventory_hostname }}" dest=/tmp/kolla_ceph_cluster mode=0600 + local_action: copy content="{{ inventory_hostname }}" dest=/tmp/kolla_ceph_cluster mode=0644 changed_when: False always_run: True when: not ceph_mon_config_volume.changed diff --git a/ansible/roles/mariadb/tasks/lookup_cluster.yml b/ansible/roles/mariadb/tasks/lookup_cluster.yml index b14afedc8d..fefc9d325b 100644 --- a/ansible/roles/mariadb/tasks/lookup_cluster.yml +++ b/ansible/roles/mariadb/tasks/lookup_cluster.yml @@ -6,7 +6,7 @@ run_once: True - name: Creating temp file on localhost - local_action: copy content=None dest=/tmp/kolla_mariadb_cluster mode=0600 + local_action: copy content=None dest=/tmp/kolla_mariadb_cluster mode=0644 changed_when: False always_run: True run_once: True @@ -19,7 +19,7 @@ register: mariadb_volume - name: Writing hostname of host with existing cluster files to temp file - local_action: copy content={{ ansible_hostname }} dest=/tmp/kolla_mariadb_cluster mode=0600 + local_action: copy content={{ ansible_hostname }} dest=/tmp/kolla_mariadb_cluster mode=0644 changed_when: False always_run: True when: not mariadb_volume | changed