Merge "define non_root_group explicitly"

This commit is contained in:
Jenkins 2017-03-15 22:14:43 +00:00 committed by Gerrit Code Review
commit 5d51ed3fe3
2 changed files with 7 additions and 8 deletions

View File

@ -170,6 +170,7 @@ tuned_profile: 'virtual-host'
# This is the name of the user the `provision` role will create on the
# remote host.
non_root_user: stack
non_root_group: "{{ non_root_user }}"
# Path for volume storage
libvirt_volume_path: "{{ working_dir }}/pool"

View File

@ -1,16 +1,14 @@
# Create a non-root user on the target host. This is the user that
# 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
user:
name: "{{ non_root_user }}"
group: "{{ non_root_group }}"
state: present
shell: /bin/bash
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 }}"