Split long lines in git role
This commit is contained in:
parent
c6410ca1f5
commit
db488ba8ef
|
@ -29,17 +29,32 @@
|
||||||
- etc-git
|
- etc-git
|
||||||
- commit-etc
|
- commit-etc
|
||||||
|
|
||||||
# yamllint disable rule:line-length
|
|
||||||
- name: set commit author
|
- name: set commit author
|
||||||
set_fact:
|
set_fact:
|
||||||
commit_author: '{% if ansible_env.SUDO_USER is not defined %}root{% else %}{{ ansible_env.SUDO_USER }}{% endif %}'
|
commit_author: >
|
||||||
commit_email: '{% if git_config_user_email.config_value is not defined or git_config_user_email.config_value == "" %}root@localhost{% else %}{{ git_config_user_email.config_value }}{% endif %}'
|
{% if ansible_env.SUDO_USER is not defined %}
|
||||||
|
root
|
||||||
|
{% else %}
|
||||||
|
{{ ansible_env.SUDO_USER }}
|
||||||
|
{% endif %}
|
||||||
|
commit_email: >
|
||||||
|
{% if git_config_user_email.config_value is not defined
|
||||||
|
or git_config_user_email.config_value == "" %}
|
||||||
|
root@localhost
|
||||||
|
{% else %}
|
||||||
|
{{ git_config_user_email.config_value }}
|
||||||
|
{% endif %}
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
- commit-etc
|
- commit-etc
|
||||||
|
|
||||||
- name: /etc modifications are committed
|
- name: /etc modifications are committed
|
||||||
shell: "git add -A . && git commit -m \"{{ commit_message | mandatory }}\" --author \"{{ commit_author | mandatory }} <{{ commit_email | mandatory }}>\""
|
shell: >
|
||||||
|
git add -A .
|
||||||
|
&& git commit
|
||||||
|
-m "{{ commit_message | mandatory }}"
|
||||||
|
--author
|
||||||
|
"{{ commit_author | mandatory }} <{{ commit_email | mandatory }}>"
|
||||||
args:
|
args:
|
||||||
chdir: /etc
|
chdir: /etc
|
||||||
register: etc_commit_end_run
|
register: etc_commit_end_run
|
||||||
|
@ -48,7 +63,6 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
- commit-etc
|
- commit-etc
|
||||||
# yamllint enable rule:line-length
|
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
var: etc_commit_end_run
|
var: etc_commit_end_run
|
||||||
|
|
Loading…
Reference in a new issue