initial version
This commit is contained in:
20
sib.changelog/tasks/main.yml
Normal file
20
sib.changelog/tasks/main.yml
Normal 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
|
||||
Reference in New Issue
Block a user