Reduce output from ansible playbooks. Some minor changes.
This commit is contained in:
@ -8,13 +8,18 @@
|
||||
stat:
|
||||
path: "~{{ item.name }}/.bashrc.ORIG"
|
||||
register: bashrc_user_orig_exists
|
||||
with_items: "{{ default_user }}"
|
||||
loop: "{{ default_user }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
tags:
|
||||
- bash
|
||||
|
||||
- name: (users-systemfiles.yml) Backup existing users .bashrc file
|
||||
command: cp ~{{ item.item.name }}/.bashrc ~{{ item.item.name }}/.bashrc.ORIG
|
||||
with_items: "{{ bashrc_user_orig_exists.results }}"
|
||||
loop: "{{ bashrc_user_orig_exists.results }}"
|
||||
loop_control:
|
||||
label: '{{ item.item.name }}'
|
||||
#with_items: "{{ bashrc_user_orig_exists.results }}"
|
||||
when: item.stat.exists == False
|
||||
tags:
|
||||
- bash
|
||||
@ -26,7 +31,9 @@
|
||||
owner: "{{ item.name }}"
|
||||
group: "{{ item.name }}"
|
||||
mode: 0644
|
||||
with_items: "{{ default_user }}"
|
||||
loop: "{{ default_user }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
when: lookup('fileglob', inventory_dir + '/files/homedirs/' + item.name + '/_bashrc')
|
||||
tags:
|
||||
- bash
|
||||
@ -63,13 +70,17 @@
|
||||
stat:
|
||||
path: "~{{ item.name }}/.profile.ORIG"
|
||||
register: profile_user_orig_exists
|
||||
with_items: "{{ default_user }}"
|
||||
loop: "{{ default_user }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
tags:
|
||||
- profile
|
||||
|
||||
- name: (users-systemfiles.yml) Backup existing users .profile file
|
||||
command: cp ~{{ item.item.name }}/.profile ~{{ item.item.name }}/.profile.ORIG
|
||||
with_items: "{{ profile_user_orig_exists.results }}"
|
||||
loop: "{{ profile_user_orig_exists.results }}"
|
||||
loop_control:
|
||||
label: '{{ item.item.name }}'
|
||||
when: item.stat.exists == False
|
||||
tags:
|
||||
- profile
|
||||
@ -81,7 +92,9 @@
|
||||
owner: "{{ item.name }}"
|
||||
group: "{{ item.name }}"
|
||||
mode: 0644
|
||||
with_items: "{{ default_user }}"
|
||||
loop: "{{ default_user }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
when: lookup('fileglob', inventory_dir + '/files/homedirs/' + item.name + '/_profile')
|
||||
tags:
|
||||
- profile
|
||||
@ -121,7 +134,9 @@
|
||||
owner: "{{ item.name }}"
|
||||
group: "{{ item.name }}"
|
||||
mode: 0644
|
||||
with_items: "{{ default_user }}"
|
||||
loop: "{{ default_user }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
when: lookup('fileglob', inventory_dir + '/files/homedirs/' + item.name + '/_vimrc')
|
||||
tags:
|
||||
- vim
|
||||
|
Reference in New Issue
Block a user