From 54be45e406bcba5ba70a2728297af02b718edad1 Mon Sep 17 00:00:00 2001 From: liyingjun Date: Tue, 23 Aug 2016 14:06:27 +0800 Subject: [PATCH] Fix toolbox permission issue when enabling ceph Directory /home/ansible/.ansible and file /var/log/kolla/ansible.log are not created by default in toolbox image, so when ceph enabled, the directory and file will be created with user 'root' instead of user 'ansible' after running bootstrap osds because it using sudo when bootstraping osds, this will cause permission denied issue for other commands not using sudo. Fixes this issue by initializing ansible by running 'ansible localhost --version' using user 'ansible' TrivialFix Change-Id: Ibac3f98b3b72cbe287ee1d3a69ed9cea7ae3cd9e --- ansible/roles/common/tasks/start.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/roles/common/tasks/start.yml b/ansible/roles/common/tasks/start.yml index 1498fc7f23..11c0c9ff98 100644 --- a/ansible/roles/common/tasks/start.yml +++ b/ansible/roles/common/tasks/start.yml @@ -31,6 +31,9 @@ - "/run/:/run/" - "kolla_logs:/var/log/kolla/" +- name: Initializing toolbox container using normal user + command: docker exec -t kolla_toolbox /usr/bin/ansible --version + - name: Starting cron container kolla_docker: action: "start_container"