diff --git a/ansible/roles/baremetal/tasks/install.yml b/ansible/roles/baremetal/tasks/install.yml index c957fccacb..e8b252e99b 100644 --- a/ansible/roles/baremetal/tasks/install.yml +++ b/ansible/roles/baremetal/tasks/install.yml @@ -88,16 +88,6 @@ virtualenv_site_packages: "{{ virtualenv is none | ternary(omit, virtualenv_site_packages) }}" become: True -- name: Ensure virtualenv has correct ownership - file: - path: "{{ virtualenv }}" - recurse: True - state: directory - owner: kolla - group: kolla - become: True - when: virtualenv is not none - - name: Remove packages package: name: "{{ item }}" diff --git a/ansible/roles/baremetal/tasks/post-install.yml b/ansible/roles/baremetal/tasks/post-install.yml index fa208018bd..b7e516a2de 100644 --- a/ansible/roles/baremetal/tasks/post-install.yml +++ b/ansible/roles/baremetal/tasks/post-install.yml @@ -31,6 +31,16 @@ become: True when: create_kolla_user | bool +- name: Ensure virtualenv has correct ownership + file: + path: "{{ virtualenv }}" + recurse: True + state: directory + owner: "{{ kolla_user }}" + group: "{{ kolla_group }}" + become: True + when: virtualenv is not none + - name: Ensure node_config_directory directory exists for user kolla file: path: "{{ node_config_directory }}"