-
Notifications
You must be signed in to change notification settings - Fork 0
/
ara_info.yml
55 lines (50 loc) · 1.56 KB
/
ara_info.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
- name: 'Collect and upload information to ARA'
hosts: 'all'
gather_facts: false
become: false
connection: 'local'
tasks:
- name: 'Collect information for ARA'
delegate_to: 'localhost'
run_once: true
check_mode: false
block:
- name: 'Collect Ansible Role versions'
shell: |
cd {{ ara_playbook_dir }}/..
ansible-galaxy list
ansible-galaxy collection list
register: 'ansible_role_versions'
environment:
PATH: '/usr/local/bin:/usr/bin:/bin'
changed_when: false
- name: 'Record in ARA'
ara_record:
key: 'ansible_role_versions'
value: "{{ ansible_role_versions['stdout'] }}"
changed_when: false
- name: 'Collect git repo version'
command: git log -1
register: 'git_version'
changed_when: false
- name: 'Record in ARA'
ara_record:
key: 'git_version'
value: "{{ git_version['stdout'] }}"
changed_when: false
- name: 'Collect git status'
shell: |
cd {{ ara_playbook_dir }}/..
echo "Untracked and modified files:"
git status -s
echo ""
echo "Diffstat with HEAD for modified files:"
git diff --stat HEAD
register: 'git_status'
changed_when: false
- name: 'Record in ARA'
ara_record:
key: 'git_status'
value: "{{ git_status['stdout'] }}"
changed_when: false