ansible-role-cmdb/tasks/main.yml

31 lines
788 B
YAML
Raw Normal View History

2023-06-19 15:12:18 +02:00
---
- name: Initiate cmdb
ansible.builtin.import_tasks: install.yml
delegate_to: "{{ cmdb.wiki_server }}"
2023-11-01 16:52:49 +01:00
tags: never, install
2023-06-19 15:12:18 +02:00
- name: Gather facts
ansible.builtin.package_facts:
manager: auto
tags: facts
2023-11-01 15:21:27 +01:00
when: inventory_hostname not in groups.storage_boxes
2023-06-19 15:12:18 +02:00
- name: Create hypervisor items
ansible.builtin.import_tasks: hypervisor.yml
2023-11-01 15:21:27 +01:00
when:
- "inventory_hostname not in groups.storage_boxes"
2023-11-01 15:30:04 +01:00
- "'qemu-system-x86' in ansible_facts.packages"
2023-06-19 15:12:18 +02:00
tags:
- hypervisor
- server
2023-11-01 15:36:50 +01:00
- name: Gather storage box facts
ansible.builtin.import_tasks: storage_box.yml
tags: storage_box
when: inventory_hostname in groups.storage_boxes
2023-06-19 15:12:18 +02:00
- name: Create server items
ansible.builtin.import_tasks: server.yml
delegate_to: "{{ cmdb.wiki_server }}"
tags: server