mirror of
https://github.com/roles-ansible/ansible_role_dotfiles.git
synced 2024-08-16 16:09:49 +02:00
33 lines
762 B
YAML
33 lines
762 B
YAML
---
|
|
- name: Create a global bashrc configuration
|
|
become: yes
|
|
template:
|
|
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
|
|
become: yes
|
|
template:
|
|
src: 'templates/bashrc'
|
|
dest: '/root/.bashrc'
|
|
owner: 'root'
|
|
group: 'root'
|
|
mode: 'u=rw,g=r,o='
|
|
when: not dotfiles__allow_own_root_bashrc | bool
|
|
|
|
- name: Copy bashrc configuration to non admin users
|
|
become: yes
|
|
template:
|
|
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'
|