replace manual versionning with latest commit id and url from git
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
---
|
||||
# tasks file for log
|
||||
- git:
|
||||
repo: "ssh://git@infra.opendoor.fr/tom/{{ myrole_name }}"
|
||||
update: no
|
||||
clone: no
|
||||
dest: /srv/repo
|
||||
delegate_to: localhost
|
||||
remote_user: tom
|
||||
become: false
|
||||
register: repo_info
|
||||
|
||||
- lineinfile:
|
||||
path: /etc/history
|
||||
create: true
|
||||
line: "{{ '%Y-%m-%d' | strftime }} {{ myrole_name }} {{ role_version }}"
|
||||
line: "{{ '%Y-%m-%d' | strftime }} {{ myrole_name }} {{ repo_info.after | regex_search( '[a-zA-Z0-9]{7}') }} https://infra.opendoor.fr/git/tom/{{ myrole_name }}/commit/{{ repo_info.after }}"
|
||||
tags: always,changelog
|
||||
|
||||
Reference in New Issue
Block a user