Commit b6f7c4cf by Feanil Patel

Use all caps for user creation vars.

parent 8245acfc
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
# Overview: # Overview:
# #
# Creates OS accounts for users based on their github credential. # Creates OS accounts for users based on their github credential.
# Expects to find a list in scope named github_users with # Expects to find a list in scope named GITHUB_USERS with
# the following structure: # the following structure:
# #
# github_users: # GITHUB_USERS:
# - user: me_at_github # - user: me_at_github
# groups: # groups:
# - adm # - adm
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
name={{ item.user }} name={{ item.user }}
groups={{ ",".join(item.groups) }} groups={{ ",".join(item.groups) }}
shell=/bin/bash shell=/bin/bash
with_items: github_users with_items: GITHUB_USERS
tags: tags:
- users - users
- update - update
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
file: file:
path=/home/{{ item.user }}/.ssh state=directory mode=0700 path=/home/{{ item.user }}/.ssh state=directory mode=0700
owner={{ item.user }} group={{ item.user }} owner={{ item.user }} group={{ item.user }}
with_items: github_users with_items: GITHUB_USERS
tags: tags:
- users - users
- update - update
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
url=https://github.com/{{ item.user }}.keys url=https://github.com/{{ item.user }}.keys
dest=/home/{{ item.user }}/.ssh/authorized_keys mode=0600 dest=/home/{{ item.user }}/.ssh/authorized_keys mode=0600
owner={{ item.user }} group={{ item.user }} owner={{ item.user }} group={{ item.user }}
with_items: github_users with_items: GITHUB_USERS
tags: tags:
- users - users
- update - update
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
- name: common | Creating env users - name: common | Creating env users
user: name={{ item.user }} {% if item.groups %}groups={{ ",".join(item.groups) }}{% endif %} shell=/bin/bash user: name={{ item.user }} {% if item.groups %}groups={{ ",".join(item.groups) }}{% endif %} shell=/bin/bash
with_items: env_users with_items: ENV_USERS
when: env_users is defined when: ENV_USERS is defined
tags: tags:
- users - users
- update - update
......
--- ---
- include: create_users.yml - include: create_users.yml
- include: create_github_users.yml - include: create_github_users.yml
when: github_users is defined when: GITHUB_USERS is defined
- name: common | Add user www-data - name: common | Add user www-data
# This user should be created on the system by default # This user should be created on the system by default
......
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