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 @@ ...@@ -2,7 +2,7 @@
# By default no super-user privileges # By default no super-user privileges
# Example: ansible-playbook -i "jarv.sandbox.edx.org," ./create_user.yml -e "user=jarv" # Example: ansible-playbook -i "jarv.sandbox.edx.org," ./create_user.yml -e "user=jarv"
# Create a user with sudo privileges # 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 - name: Create a single user
hosts: all hosts: all
become: True become: True
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
CUSTOM_USER_INFO: CUSTOM_USER_INFO:
- name: "{{ user }}" - name: "{{ user }}"
github: true github: true
when: give_become is not defined when: give_sudo is not defined
- name: give access with become - name: give access with sudo
set_fact: set_fact:
CUSTOM_USER_INFO: CUSTOM_USER_INFO:
- name: "{{ user }}" - name: "{{ user }}"
type: admin type: admin
github: true github: true
when: give_become is defined when: give_sudo is defined
roles: roles:
- role: user - role: user
user_info: "{{ CUSTOM_USER_INFO }}" 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