Skip to content

Commit

Permalink
ACA-1487: Fix creation of temp files
Browse files Browse the repository at this point in the history
Signed-off-by: Ondra Machacek <omachace@redhat.com>
  • Loading branch information
machacekondra committed May 14, 2024
1 parent d68c201 commit d8691bf
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/28-fix-temp-file-creation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- info - Fix creation of temporary files
9 changes: 7 additions & 2 deletions roles/info/tasks/appliance_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
password: "{{ info_password }}"
port: "{{ info_port | d(omit) }}"
validate_certs: "{{ info_validate_certs }}"
gather: "{{ info_appliance_gather }}"
properties: "{{ info_appliance_gather }}"
register: __apliance

- name: Make sure directory exists

Check failure on line 11 in roles/info/tasks/appliance_info.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

risky-file-permissions

File permissions unset or incorrect.
ansible.builtin.file:
path: "{{ info_appliance_file | dirname }}"
state: "directory"

- name: Create JSON file from fetched data
ansible.builtin.copy:
content: "{{ __apliance | map(attribute='appliance') | to_json }}"
content: "{{ __apliance.appliance | to_json }}"
dest: "{{ info_appliance_file }}"
mode: "0644"
5 changes: 5 additions & 0 deletions roles/info/tasks/cluster_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
tags:
- cluster

- name: Make sure directory exists

Check failure on line 29 in roles/info/tasks/cluster_info.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

risky-file-permissions

File permissions unset or incorrect.
ansible.builtin.file:
path: "{{ info_cluster_file | dirname }}"
state: "directory"

- name: Create JSON file from fetched data
ansible.builtin.copy:
content: "{{ __clusters_info.results | map(attribute='clusters') | to_json }}"
Expand Down
5 changes: 5 additions & 0 deletions roles/info/tasks/guest_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
validate_certs: "{{ info_validate_certs }}"
register: __guests

- name: Make sure directory exists

Check failure on line 10 in roles/info/tasks/guest_info.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

risky-file-permissions

File permissions unset or incorrect.
ansible.builtin.file:
path: "{{ info_guest_file | dirname }}"
state: "directory"

- name: Create JSON file from fetched data
ansible.builtin.copy:
content: "{{ __guests | to_json }}"
Expand Down
5 changes: 5 additions & 0 deletions roles/info/tasks/license_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
validate_certs: "{{ info_validate_certs }}"
register: __license

- name: Make sure directory exists

Check failure on line 10 in roles/info/tasks/license_info.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

risky-file-permissions

File permissions unset or incorrect.
ansible.builtin.file:
path: "{{ info_license_file | dirname }}"
state: "directory"

- name: Create JSON file from fetched data
ansible.builtin.copy:
content: "{{ __license.licenses | to_json }}"
Expand Down
5 changes: 5 additions & 0 deletions roles/info/tasks/storage_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
validate_certs: "{{ info_validate_certs }}"
register: __storage_policy

- name: Make sure directory exists

Check failure on line 10 in roles/info/tasks/storage_info.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

risky-file-permissions

File permissions unset or incorrect.
ansible.builtin.file:
path: "{{ info_storage_file | dirname }}"
state: "directory"

- name: Create JSON file from fetched data
ansible.builtin.copy:
content: "{{ __storage_policy.spbm_profiles | to_json }}"
Expand Down

0 comments on commit d8691bf

Please sign in to comment.