Skip to content

Commit 0b76a50

Browse files
committed
FEAT-036: Add a role to write the characteristics file for a machine.
1 parent 25cbe43 commit 0b76a50

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
dependencies:
3+
- yaegashi.blockinfile
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
# This Ansible playbook creates a characteristics file to help with bug
3+
# reporting.
4+
5+
- name: Obtain version information.
6+
command: cat /vagrant/repository_version
7+
register: text
8+
9+
- name: Obtain date.
10+
command: date
11+
register: date
12+
13+
- name: Obtain other information.
14+
command: cat /vagrant/build_information
15+
register: build_info
16+
17+
- name: Write characteristics file.
18+
blockinfile:
19+
dest=/virtualmicromagnetics_machine_characteristics
20+
create=yes
21+
marker="# --- {mark} ADDED BY ANSIBLE ---"
22+
content="\nBuild virtualmicromagnetics version: {{ text.stdout }}\nBuild date: {{ date.stdout }}\n{{ build_info.stdout }}"
23+
sudo: yes

0 commit comments

Comments
 (0)