Jérémy Lecour
ee21973371
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2777|524|2253|2462|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/223//ansiblelint">Evolix » ansible-roles » unstable #223</a>
gitea/ansible-roles/pipeline/head This commit looks good
Fully Qualified Collection Name
36 lines
1 KiB
YAML
36 lines
1 KiB
YAML
---
|
|
- name: "Assert that we have been called with `container` defined"
|
|
ansible.builtin.assert:
|
|
that:
|
|
- container is defined
|
|
|
|
- name: "Define path to /etc in {{ container }} container"
|
|
ansible.builtin.set_fact:
|
|
container_etc: "{{ ('/var/lib/lxc', container, 'rootfs/etc') | path_join }}"
|
|
|
|
- name: "Check if /etc is a git repository in {{ container }}"
|
|
ansible.builtin.stat:
|
|
path: "{{ (container_etc, '.git') | path_join }}"
|
|
get_attributes: no
|
|
get_checksum: no
|
|
get_mime: no
|
|
register: "container_etc_git"
|
|
|
|
- name: "Evocommit /etc of {{ container }}"
|
|
ansible.builtin.command:
|
|
argv:
|
|
- /usr/local/bin/evocommit
|
|
- '--ansible'
|
|
- '--repository'
|
|
- "{{ container_etc }}"
|
|
- '--message'
|
|
- "{{ commit_message | mandatory }}"
|
|
changed_when:
|
|
- "container_etc_git_commit.stdout"
|
|
- "'CHANGED:' in container_etc_git_commit.stdout"
|
|
ignore_errors: yes
|
|
register: "container_etc_git_commit"
|
|
when:
|
|
- "container_etc_git.stat.exists"
|
|
- "container_etc_git.stat.isdir"
|