Fix ownership of virtualenv in bootstrap-servers
In I86bf5e1df3d6568c4f1ca6f4757f08a3dd22754d, creation of the kolla user was moved to after package installation to ensure the sudo package is installed when required. This change does not work when python dependencies are installed in a virtual environment however - when the virtualenv variable is set. This change moves the ownership change of the virtualenv to after the kolla user has been created. It also uses the kolla_user and kolla_group variables to set the user and group appropriately. Change-Id: I320e5d611099ad162945a98d5505a79606da0eba TrivialFix
This commit is contained in:
parent
53b2cdca2c
commit
4283dff9b4
@ -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 }}"
|
||||
|
@ -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 }}"
|
||||
|
Loading…
Reference in New Issue
Block a user