-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal.yml
32 lines (27 loc) · 922 Bytes
/
local.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
- name: local.yml
become: true
hosts: all
gather_facts: true
tasks:
- name: Gather the package facts
ansible.builtin.package_facts:
manager: auto
- name: Call the grafana-agent-flow role if grafana-agent-flow is not already installed
include_role:
name: grafana-agent-flow
when: "'grafana-agent-flow' not in ansible_facts.packages"
- name: Call the grype role if grype is not already installed
include_role:
name: grype
when: "'grype' not in ansible_facts.packages"
- name: Call the qemu-guest-agent role if its a Proxmox VM and it's not already installed
include_role:
name: qemu-guest-agent
when:
- ansible_system_vendor == "QEMU"
- "'qemu-guest-agent' not in ansible_facts.packages"
- name: Call the syft role if syft is not already installed
include_role:
name: syft
when: "'syft' not in ansible_facts.packages"