mirror of
https://github.com/roles-ansible/ansible_role_dotfiles.git
synced 2024-08-16 16:09:49 +02:00
Optionally delete /root/.bashrc
This commit is contained in:
parent
d8f467f4d4
commit
4e651731f0
2 changed files with 7 additions and 1 deletions
|
@ -14,4 +14,4 @@ bash:
|
||||||
shell: "/bin/bash"
|
shell: "/bin/bash"
|
||||||
keyboard: '$(if [[ $(id -u) -ne 0 ]];then echo "\[\033[01;33m\]"; else echo "\[\033[01;31m\]"; fi) $(if [[ $? == 0 ]]; then printf "\xE2\x9D\xA4"; fi) \[\033[01;32m\]\u\[\033[01;36m\]@\[\033[01;32m\]\H\[\033[01;34m\] <\A> \[\033[01;35m\] \j \[\033[01;36m\] \w \[\033[01;33m\]\n\[\033[01;33m\] $(git branch 2>/dev/null | sed -n "s/* \(.*\)/\1 /p")$\[\033[01;00m\] '
|
keyboard: '$(if [[ $(id -u) -ne 0 ]];then echo "\[\033[01;33m\]"; else echo "\[\033[01;31m\]"; fi) $(if [[ $? == 0 ]]; then printf "\xE2\x9D\xA4"; fi) \[\033[01;32m\]\u\[\033[01;36m\]@\[\033[01;32m\]\H\[\033[01;34m\] <\A> \[\033[01;35m\] \j \[\033[01;36m\] \w \[\033[01;33m\]\n\[\033[01;33m\] $(git branch 2>/dev/null | sed -n "s/* \(.*\)/\1 /p")$\[\033[01;00m\] '
|
||||||
|
|
||||||
|
allow_own_root_bashrc: true
|
||||||
|
|
|
@ -90,3 +90,9 @@
|
||||||
with_items: "{{ admins }}"
|
with_items: "{{ admins }}"
|
||||||
when: admins is defined
|
when: admins is defined
|
||||||
|
|
||||||
|
- name: delete root .bashrc
|
||||||
|
become: true
|
||||||
|
file:
|
||||||
|
state: absent
|
||||||
|
path: "/root/.bashrc"
|
||||||
|
when: allow_own_root_bashrc == False
|
||||||
|
|
Loading…
Reference in a new issue