Merge "define non_root_group explicitly"
This commit is contained in:
commit
5d51ed3fe3
|
@ -170,6 +170,7 @@ tuned_profile: 'virtual-host'
|
||||||
# This is the name of the user the `provision` role will create on the
|
# This is the name of the user the `provision` role will create on the
|
||||||
# remote host.
|
# remote host.
|
||||||
non_root_user: stack
|
non_root_user: stack
|
||||||
|
non_root_group: "{{ non_root_user }}"
|
||||||
|
|
||||||
# Path for volume storage
|
# Path for volume storage
|
||||||
libvirt_volume_path: "{{ working_dir }}/pool"
|
libvirt_volume_path: "{{ working_dir }}/pool"
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
# Create a non-root user on the target host. This is the user that
|
# Create a non-root user on the target host. This is the user that
|
||||||
# will own the virtual infrastructure on which we deploy openstack.
|
# will own the virtual infrastructure on which we deploy openstack.
|
||||||
|
- name: Create non-root group
|
||||||
|
group:
|
||||||
|
name: "{{ non_root_group }}"
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Create non-root user
|
- name: Create non-root user
|
||||||
user:
|
user:
|
||||||
name: "{{ non_root_user }}"
|
name: "{{ non_root_user }}"
|
||||||
|
group: "{{ non_root_group }}"
|
||||||
state: present
|
state: present
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Get current user group for virthost
|
|
||||||
command: "id -gn {{ non_root_user }}"
|
|
||||||
register: virthost_user_group
|
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- name: Register fact for current user group
|
|
||||||
set_fact: non_root_group="{{ virthost_user_group.stdout }}"
|
|
||||||
|
|
Loading…
Reference in New Issue