diff --git a/ansible/roles/baremetal/tasks/install.yml b/ansible/roles/baremetal/tasks/install.yml index c957fccacb5d97427501e38f0825bb890ca41a81..e8b252e99bb6f557cf0aa3ec801a3c68af8a5933 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 fa208018bd9a8d0a31ec89c0331b667023733ac5..b7e516a2de58d7e5d624d13934baaba8a43710c5 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 }}"