initial version

This commit is contained in:
2023-10-12 14:19:44 +02:00
commit 04d1738e55
17 changed files with 374 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
---
# tasks file for log
- name: "get sha of latest commit"
ansible.builtin.git:
repo: "https://infra.opendoor.fr/git/tom/{{ myrole_name }}"
clone: no
update: no
dest: /tmp/foobar
register: repo_info
delegate_to: localhost
- debug:
msg: "{{ repo_info.after | regex_search( '[0-9a-zA-Z]{7}' ) }}"
- name: "update ansible history"
ansible.builtin.lineinfile:
path: /etc/history
create: true
line: "{{ '%Y-%m-%d' | strftime }} {{ myrole_name }} {{ repo_info.after | regex_search( '[0-9a-zA-Z]{6}' ) }}"
tags: always,changelog