forked from hitachienergy/epiphany
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add epicli versioning (hitachienergy#1306)
* Add version info file creation for each VM used.
- Loading branch information
Showing
5 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
core/src/epicli/data/common/ansible/playbooks/roles/versioning/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
- name: Create versioning directory if it does not exist. | ||
file: | ||
path: /etc/epicli | ||
state: directory | ||
mode: '0755' | ||
|
||
- name: Get versioning file status. | ||
stat: | ||
path: /etc/epicli/version | ||
register: versioning_file | ||
|
||
- name: Create versioning file. | ||
copy: | ||
dest: /etc/epicli/version | ||
content: | | ||
#mode | date | version | ||
when: not versioning_file.stat.exists | ||
|
||
- name: Append versioning info. | ||
lineinfile: | ||
path: /etc/epicli/version | ||
line: "{{ mode }} | {{ date }} | {{ version }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
# Ansible playbook for adding epicli version info for each component used | ||
|
||
- hosts: all | ||
become: true | ||
become_method: sudo | ||
tasks: | ||
- import_role: | ||
name: versioning |