Files
sib_multi_os/sib.changelog/tasks/main.yml
2023-10-12 14:19:44 +02:00

21 lines
572 B
YAML

---
# 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