Quick fix to avoid failure when you are in root without su/sudo
This commit is contained in:
parent
b64073dd39
commit
b5b46e707c
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
- name: "set commit author"
|
- name: "set commit author"
|
||||||
set_fact:
|
set_fact:
|
||||||
commit_author: '{% if ansible_env.SUDO_USER == "" %}root{% else %}{{ ansible_env.SUDO_USER }}{% endif %}'
|
commit_author: '{% if ansible_env.SUDO_USER is not defined %}root{% else %}{{ ansible_env.SUDO_USER }}{% endif %}'
|
||||||
commit_email: '{% if git_config_user_email.config_value == "" %}root@localhost{% else %}{{ git_config_user_email.config_value }}{% endif %}'
|
commit_email: '{% if git_config_user_email.config_value == "" %}root@localhost{% else %}{{ git_config_user_email.config_value }}{% endif %}'
|
||||||
|
|
||||||
- name: "/etc modifications are committed"
|
- name: "/etc modifications are committed"
|
||||||
|
|
Loading…
Reference in a new issue