38 lines
981 B
YAML
38 lines
981 B
YAML
---
|
|
- name: Initiate cmdb
|
|
ansible.builtin.import_tasks: install.yml
|
|
delegate_to: "{{ cmdb.wiki_server }}"
|
|
tags: never, install
|
|
|
|
- name: Gather facts
|
|
ansible.builtin.package_facts:
|
|
manager: auto
|
|
tags: facts
|
|
when: inventory_hostname not in groups.storage_boxes
|
|
|
|
- name: Create hypervisor items
|
|
ansible.builtin.import_tasks: hypervisor.yml
|
|
when:
|
|
- "inventory_hostname not in groups.storage_boxes"
|
|
- "'qemu-system-x86' in ansible_facts.packages"
|
|
tags:
|
|
- hypervisor
|
|
- server
|
|
|
|
- name: Gather storage box facts
|
|
ansible.builtin.import_tasks: storage_box.yml
|
|
tags: storage_box
|
|
when: inventory_hostname in groups.storage_boxes
|
|
|
|
- name: Create server items
|
|
ansible.builtin.import_tasks: server.yml
|
|
delegate_to: "{{ cmdb.wiki_server }}"
|
|
tags: server
|
|
|
|
- name: Purging Dokuwiki cache
|
|
ansible.builtin.file:
|
|
path: "{{ cmdb.wiki_conf_file_path }}"
|
|
state: touch
|
|
run_once: true
|
|
delegate_to: "{{ cmdb.wiki_server }}"
|
|
tags: purge_cache
|