ansible-role-cmdb/tasks/storage_box.yml
phil 7e734ca002 Use raw module for storage boxes
because there is no python interpreter
2023-11-01 16:29:04 +01:00

24 lines
726 B
YAML

---
- name: "Storage Box | Set facts for storage storage boxes"
ansible.builtin.set_fact:
ansible_date_time:
date: "{{ '%Y-%m-%d' | strftime }}"
time: "{{ '%H:%M:%S' | strftime }}"
- name: "Storage Box | Scrap free space"
ansible.builtin.raw: "df -h"
register: command_out
changed_when: false
- name: "Storage Box | Set VM fact"
ansible.builtin.set_fact:
sb_space: "{{ command_out.stdout }}"
- name: "Storage Box | Write Storage Box startpage"
ansible.builtin.template:
src: storage_boxes.txt.j2
dest: "{{ cmdb.wiki_pages_path }}/servers/storage_boxes.txt"
owner: "{{ cmdb.wiki_user }}"
group: "{{ cmdb.wiki_group }}"
mode: "0644"
delegate_to: "{{ cmdb.wiki_server }}"