1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_dotfiles.git synced 2024-08-16 16:09:49 +02:00
ansible_role_dotfiles/tasks/bashrc.yml
L3D 0e9269f7e7
improve role behavior (#2)
* Resolve linting warnings

* rebuild role structure and add more bash options

* Add github action tasks

* fix typo

* fix another typo

* fix another typo

* fix another typo

* fix another typo

* fix another typo

* fix another typo

* Improve default values

* create optional bashrc for users
2020-11-13 11:30:51 +01:00

33 lines
758 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 base__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'