2020-11-13 11:30:51 +01:00
|
|
|
---
|
|
|
|
- name: Create a global bashrc configuration
|
2021-01-25 16:29:11 +01:00
|
|
|
become: true
|
2021-09-19 03:18:12 +02:00
|
|
|
ansible.builtin.template:
|
2020-11-13 11:30:51 +01:00
|
|
|
src: 'templates/bash.bashrc'
|
|
|
|
dest: '/etc/bash.bashrc'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 'u=rw,g=r,o=r'
|
|
|
|
|
|
|
|
- name: Copy bashrc configuration to root
|
2021-01-25 16:29:11 +01:00
|
|
|
become: true
|
2021-09-19 03:18:12 +02:00
|
|
|
ansible.builtin.template:
|
2020-11-13 11:30:51 +01:00
|
|
|
src: 'templates/bashrc'
|
|
|
|
dest: '/root/.bashrc'
|
|
|
|
owner: 'root'
|
|
|
|
group: 'root'
|
|
|
|
mode: 'u=rw,g=r,o='
|
2020-11-13 14:28:57 +01:00
|
|
|
when: not dotfiles__allow_own_root_bashrc | bool
|
2020-11-13 11:30:51 +01:00
|
|
|
|
|
|
|
- name: Copy bashrc configuration to non admin users
|
2021-01-25 16:29:11 +01:00
|
|
|
become: true
|
2021-09-19 03:18:12 +02:00
|
|
|
ansible.builtin.template:
|
2020-11-13 11:30:51 +01:00
|
|
|
src: 'templates/bashrc'
|
|
|
|
dest: '/home/{{ item }}/.bashrc'
|
|
|
|
owner: '{{ item }}'
|
|
|
|
group: '{{ item }}'
|
|
|
|
mode: 'u=rw,g=r,o='
|
|
|
|
with_items: '{{ accounts }}'
|
|
|
|
when:
|
|
|
|
- accounts is defined
|
|
|
|
- accounts != ['root']
|
|
|
|
- accounts != 'root'
|