Comment 1 for bug 1912103

Revision history for this message
John Fulton (jfulton-org) wrote :

The way config-download is being run these days results in /home/stack/config-download/<STACK> being owned by stack:stack. The following task in tripleo_ansible/roles/tripleo_ceph_work_dir/tasks/prepare.yml creates /home/stack/config-download/<STACK>/ceph-ansible

  become: true
  file:
    path: "{{ item }}"
    state: directory
    owner: "{{ ansible_user }}"

The become results in this directory belonging to the group root and it would belong to the user root unless the ansible_user variable wasn't set. By simply removing the become and redeploying the directory has the preferred permission of stack:stack so the become is not necessary and introduces this bug.

Note that the tripleo_ceph_work_dir role is executed when the following part of deploy_steps_playbook.yaml runs:

  tasks:
    - name: External deployment step 1
      delegate_to: localhost
      run_once: true
      debug:
        msg: Use --start-at-task 'External deployment step 1' to resume from this task
    - include_tasks: "external_deploy_steps_tasks_step1.yaml"
      when:
        - "'external_deploy_steps_tasks_step1.yaml' is exists"

where external_deploy_steps_tasks_step1.yaml does:

include_role: tripleo_ceph_work_dir
tasks_from: prepare.yml

So when it's run it has delegate_to: localhost.