Commit 3debac48 by John Eskew

Debugging info only.

parent 13542972
...@@ -70,6 +70,10 @@ ...@@ -70,6 +70,10 @@
# want to provide more binaries add them to user_rbash_links # want to provide more binaries add them to user_rbash_links
# which can be passed in as a parameter to the role. # which can be passed in as a parameter to the role.
# #
- name: Which packages to install
debug:
var: user_debian_pkgs
- name: Install debian packages user role needs - name: Install debian packages user role needs
apt: apt:
name: "{{ item }}" name: "{{ item }}"
...@@ -79,31 +83,31 @@ ...@@ -79,31 +83,31 @@
with_items: "{{ user_debian_pkgs }}" with_items: "{{ user_debian_pkgs }}"
when: ansible_distribution in common_debian_variants when: ansible_distribution in common_debian_variants
- debug: - debug:
var: user_info var: user_info
- name: Create the edxadmin group - name: Create the edxadmin group
group: group:
name: edxadmin name: edxadmin
state: present state: present
# some AMIs (such as EMR master nodes) don't read the config files out of /etc/sudoers.d by default # some AMIs (such as EMR master nodes) don't read the config files out of /etc/sudoers.d by default
- name: Ensure sudoers.d is read - name: Ensure sudoers.d is read
lineinfile: lineinfile:
dest: /etc/sudoers dest: /etc/sudoers
state: present state: present
regexp: '^#includedir /etc/sudoers.d' regexp: '^#includedir /etc/sudoers.d'
line: '#includedir /etc/sudoers.d' line: '#includedir /etc/sudoers.d'
validate: 'visudo -cf %s' validate: 'visudo -cf %s'
# give full sudo admin access to the edxadmin group # give full sudo admin access to the edxadmin group
- name: Grant full sudo access to the edxadmin group - name: Grant full sudo access to the edxadmin group
copy: copy:
content: "%edxadmin ALL=(ALL) NOPASSWD:ALL" content: "%edxadmin ALL=(ALL) NOPASSWD:ALL"
dest: /etc/sudoers.d/edxadmin dest: /etc/sudoers.d/edxadmin
owner: root owner: root
group: root group: root
mode: 0440 mode: 0440
validate: 'visudo -cf %s' validate: 'visudo -cf %s'
- name: Create the users - name: Create the users
...@@ -144,9 +148,9 @@ ...@@ -144,9 +148,9 @@
with_items: "{{ user_info }}" with_items: "{{ user_info }}"
- name: Create bashrc file for normal users - name: Create bashrc file for normal users
template: template:
src: default.bashrc.j2 src: default.bashrc.j2
dest: "/home/{{ item.name }}/.bashrc" dest: "/home/{{ item.name }}/.bashrc"
mode: "0640" mode: "0640"
owner: "{{ item.name }}" owner: "{{ item.name }}"
when: not (item.type is defined and item.type == 'restricted') and item.get('state', 'present') == 'present' when: not (item.type is defined and item.type == 'restricted') and item.get('state', 'present') == 'present'
...@@ -155,7 +159,7 @@ ...@@ -155,7 +159,7 @@
- name: Create .profile for all users - name: Create .profile for all users
template: template:
src: default.profile.j2 src: default.profile.j2
dest: "/home/{{ item.name }}/.profile" dest: "/home/{{ item.name }}/.profile"
mode: "0640" mode: "0640"
owner: "{{ item.name }}" owner: "{{ item.name }}"
when: item.get('state', 'present') == 'present' when: item.get('state', 'present') == 'present'
...@@ -174,7 +178,7 @@ ...@@ -174,7 +178,7 @@
- name: Create bashrc file for restricted users - name: Create bashrc file for restricted users
template: template:
src: restricted.bashrc.j2 src: restricted.bashrc.j2
dest: "/home/{{ item.name }}/.bashrc" dest: "/home/{{ item.name }}/.bashrc"
mode: "0640" mode: "0640"
owner: "{{ item.name }}" owner: "{{ item.name }}"
when: item.type is defined and item.type == 'restricted' and item.get('state', 'present') == 'present' when: item.type is defined and item.type == 'restricted' and item.get('state', 'present') == 'present'
...@@ -183,10 +187,10 @@ ...@@ -183,10 +187,10 @@
- name: Create sudoers file from template - name: Create sudoers file from template
template: template:
dest: /etc/sudoers.d/99-restricted dest: /etc/sudoers.d/99-restricted
src: restricted.sudoers.conf.j2 src: restricted.sudoers.conf.j2
owner: root owner: root
group: root group: root
mode: 0440 mode: 0440
validate: 'visudo -cf %s' validate: 'visudo -cf %s'
# Prevent restricted user from updating their PATH and # Prevent restricted user from updating their PATH and
...@@ -203,10 +207,10 @@ ...@@ -203,10 +207,10 @@
- name: Create ~/bin directory - name: Create ~/bin directory
file: file:
path: "/home/{{ item.name }}/bin" path: "/home/{{ item.name }}/bin"
state: directory state: directory
mode: "0750" mode: "0750"
owner: root owner: root
group: "{{ item.name }}" group: "{{ item.name }}"
when: item.type is defined and item.type == 'restricted' and item.get('state', 'present') == 'present' when: item.type is defined and item.type == 'restricted' and item.get('state', 'present') == 'present'
with_items: "{{ user_info }}" with_items: "{{ 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