mirror of
https://github.com/roles-ansible/ansible_role_dotfiles.git
synced 2024-08-16 16:09:49 +02:00
Add exception handling for root
This commit is contained in:
parent
b8ccf73079
commit
b15368ad57
2 changed files with 14 additions and 4 deletions
|
@ -59,7 +59,10 @@
|
||||||
group: '{{ item }}'
|
group: '{{ item }}'
|
||||||
mode: 'u=rw,g=r,o='
|
mode: 'u=rw,g=r,o='
|
||||||
with_items: '{{ accounts }}'
|
with_items: '{{ accounts }}'
|
||||||
when: accounts is defined
|
when:
|
||||||
|
- accounts is defined
|
||||||
|
- accounts != ['root']
|
||||||
|
- accounts != 'root'
|
||||||
|
|
||||||
- name: Copy vimrc configuration to root
|
- name: Copy vimrc configuration to root
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -79,7 +82,10 @@
|
||||||
group: '{{ item }}'
|
group: '{{ item }}'
|
||||||
mode: 'u=rw,g=r,o='
|
mode: 'u=rw,g=r,o='
|
||||||
with_items: "{{ accounts }}"
|
with_items: "{{ accounts }}"
|
||||||
when: accounts is defined
|
when:
|
||||||
|
- accounts is defined
|
||||||
|
- accounts != ['root']
|
||||||
|
- accounts != 'root'
|
||||||
|
|
||||||
- name: Copy vimrc configuration to admin users
|
- name: Copy vimrc configuration to admin users
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -108,7 +114,11 @@
|
||||||
owner: "{{ item }}"
|
owner: "{{ item }}"
|
||||||
group: "{{ item }}"
|
group: "{{ item }}"
|
||||||
with_items: "{{ accounts }}"
|
with_items: "{{ accounts }}"
|
||||||
when: ranger_hidden_files | bool
|
when:
|
||||||
|
- ranger_hidden_files | bool
|
||||||
|
- accounts is defined
|
||||||
|
- accounts != ['root']
|
||||||
|
- accounts != 'root'
|
||||||
|
|
||||||
- name: create .config/ranger/rc.conf file
|
- name: create .config/ranger/rc.conf file
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -8,5 +8,5 @@ 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\] '
|
||||||
|
|
||||||
playbook_version_number: 107 # integer without dots
|
playbook_version_number: 108 # integer without dots
|
||||||
playbook_version_path: '/etc/ansible-version/role_dotfiles_chaos-bodensee_github.version'
|
playbook_version_path: '/etc/ansible-version/role_dotfiles_chaos-bodensee_github.version'
|
||||||
|
|
Loading…
Reference in a new issue