-
Notifications
You must be signed in to change notification settings - Fork 1
/
ara.yml
36 lines (31 loc) · 1.01 KB
/
ara.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
33
34
35
36
---
- name: Deploy ARA recording to VM host
hosts: all
user: root
gather_facts: false
vars:
ara_server_ip: "127.0.0.1"
tasks:
- name: Deploy ARA if enabled
include_role:
name: deploy_ara_api
when: ara_enable | bool
- name: Configure ARA recording on host if enabled
include_role:
name: config_ara_recording
when: ara_enable | bool
- name: Gather net facts
ansible.builtin.setup:
gather_subset:
- default_ipv4
when: ara_enable | bool and ansible_connection != 'local'
- name: Set ARA server IP
ansible.builtin.set_fact:
ara_server_ip: "{{ ansible_default_ipv4.address | default(ansible_all_ipv4_addresses[0]) }}"
when: ara_enable | bool and ansible_connection != 'local'
- name: Configure ARA recording on localhost if enabled and remote
include_role:
name: config_ara_recording
apply:
delegate_to: localhost
when: ara_enable | bool and ara_server_ip != "127.0.0.1"