solution
This commit is contained in:
46
sib.changelog/README.md
Normal file
46
sib.changelog/README.md
Normal file
@@ -0,0 +1,46 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
Simple role to create changelog on remote server
|
||||
|
||||
Will insert date, name of calling role, version of calling role in /etc/history
|
||||
|
||||
Should be included as dependent of others roles
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
None
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
myrole_name - name of role
|
||||
role_version - version of calling role
|
||||
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
None
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Not intended, but add this in meta/main.yml of your roles:
|
||||
|
||||
```yaml
|
||||
dependencies:
|
||||
- { role: tco.changelog, role_version: 1.0, myrole_name: CHANGEME }
|
||||
```
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
Thomas C <thomas@opendoor.fr>
|
||||
8
sib.changelog/tasks/main.yml
Normal file
8
sib.changelog/tasks/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# tasks file for log
|
||||
- name: "update ansible history"
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/history
|
||||
create: true
|
||||
line: "{{ '%Y-%m-%d' | strftime }} {{ myrole_name }} {{ role_version }}"
|
||||
tags: always,changelog
|
||||
Reference in New Issue
Block a user