OPS-1593 As an operator, I want sudo_user converted to become user in roles and…

OPS-1593 As an operator, I want sudo_user converted to become user in roles and plays, for compatibility with Ansible 2.x
parent 2a62e77c
......@@ -2,7 +2,7 @@
# By default no super-user privileges
# Example: ansible-playbook -i "jarv.sandbox.edx.org," ./create_user.yml -e "user=jarv"
# Create a user with sudo privileges
# Example: ansible-playbook -i "jarv.sandbox.edx.org," ./create_user.yml -e "user=jarv" -e "give_become=true"
# Example: ansible-playbook -i "jarv.sandbox.edx.org," ./create_user.yml -e "user=jarv" -e "give_sudo=true"
- name: Create a single user
hosts: all
become: True
......@@ -15,14 +15,14 @@
CUSTOM_USER_INFO:
- name: "{{ user }}"
github: true
when: give_become is not defined
- name: give access with become
when: give_sudo is not defined
- name: give access with sudo
set_fact:
CUSTOM_USER_INFO:
- name: "{{ user }}"
type: admin
github: true
when: give_become is defined
when: give_sudo is defined
roles:
- role: user
user_info: "{{ CUSTOM_USER_INFO }}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment