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 a99e1a44
......@@ -13,7 +13,7 @@
pre_tasks:
- fail: msg="You must pass a user into this play"
when: user is not defined
- name: give access with no become
- name: give access with no sudo
set_fact:
CUSTOM_USER_INFO:
- name: "{{ user }}"
......@@ -23,10 +23,10 @@
- name: test-normal-user
- name: test-restricted-user-edxapp
type: restricted
becomeers_template: 99-edxapp-manage-cmds.j2
sudoers_template: 99-edxapp-manage-cmds.j2
- name: test-restricted-user-anayltics
type: restricted
becomeers_template: 99-analytics-manage-cmds.j2
sudoers_template: 99-analytics-manage-cmds.j2
roles:
- role: user
user_info: "{{ CUSTOM_USER_INFO }}"
# Creates a single user on a server
# By default no super-user privileges
# Example: ansible-playbook -i "jarv.sandbox.edx.org," ./create_user.yml -e "user=jarv"
# Create a user with become 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"
- name: Create a single user
hosts: all
......@@ -10,7 +10,7 @@
pre_tasks:
- fail: msg="You must pass a user into this play"
when: user is not defined
- name: give access with no become
- name: give access with no sudo
set_fact:
CUSTOM_USER_INFO:
- name: "{{ user }}"
......
- hosts: all
become: true
become: True
vars:
# By default take instances in and out of the elb(s) they
# are attached to
......
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