2020-11-25 09:41:02 +00:00
|
|
|
---
|
|
|
|
- name: "create inventory folder {{ doku_path }}"
|
|
|
|
local_action:
|
|
|
|
module: file
|
|
|
|
path: "{{ doku_path }}"
|
|
|
|
state: directory
|
|
|
|
mode: 0755
|
|
|
|
run_once: True
|
|
|
|
|
2021-10-06 11:13:22 +00:00
|
|
|
- name: "[RPM] Install pythonX-rpm"
|
|
|
|
package:
|
|
|
|
name: "python{{ ansible_facts.python.version.major|replace('2', '') }}-rpm"
|
|
|
|
when: ansible_pkg_mgr in ["dnf", "zypper"]
|
|
|
|
|
|
|
|
- name: "[RPM] Install rpm-python"
|
|
|
|
package:
|
|
|
|
name: "rpm-python"
|
|
|
|
when: ansible_pkg_mgr in ["yum"]
|
|
|
|
|
2020-11-25 09:48:24 +00:00
|
|
|
- package_facts:
|
|
|
|
ignore_errors: True
|
|
|
|
|
|
|
|
- service_facts:
|
|
|
|
ignore_errors: True
|
|
|
|
|
2020-11-25 09:41:02 +00:00
|
|
|
- name: write wiki page
|
|
|
|
local_action:
|
|
|
|
module: template
|
|
|
|
src: host.j2
|
2020-11-25 09:45:34 +00:00
|
|
|
dest: "{{ doku_path }}/{{ inventory_hostname|lower }}.txt"
|
2020-11-25 09:41:02 +00:00
|
|
|
|
|
|
|
- name: write index page
|
|
|
|
local_action:
|
|
|
|
module: template
|
|
|
|
src: start.j2
|
|
|
|
dest: "{{ doku_path }}/start.txt"
|
|
|
|
run_once: True
|
2021-10-06 11:14:01 +00:00
|
|
|
tags:
|
|
|
|
- indexonly
|
2020-11-25 09:41:02 +00:00
|
|
|
|