-
Notifications
You must be signed in to change notification settings - Fork 1
/
100.3_set_ip_for_agents.yaml
49 lines (42 loc) · 1.26 KB
/
100.3_set_ip_for_agents.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
# Example Playbok to deploy agentzs
- name: Get Agent Whitelist
hosts: localhost
gather_facts: no
connection: local
vars_files:
- ./vars/main.yml
- ./vars/agents_vars.yaml
vars:
agent_ver: "1915"
agent_branch: "19.15-69"
tasks:
- name: Checking Required Variable ppdm_fqdn
fail:
msg: "We do not have ppdm fqdn set !"
when: (ppdm_fqdn is not defined) or (ppdm_fqdn|length <= 8)
- name: Checking Required Variable ppdm_new_password
fail:
msg: "We do not have ppdm_new_password set !"
when: (ppdm_new_password is not defined) or (ppdm_new_password|length == 0)
- name: Setting Base URL
set_fact:
ppdm_baseurl: "https://{{ ppdm_fqdn | regex_replace('^https://') }}"
- name: Get PPDM Token for https://{{ ppdm_fqdn | regex_replace('^https://') }}
include_role:
name: get_ppdm_token
vars:
ppdm_password: "{{ ppdm_new_password }}"
- debug:
msg: "{{ access_token }}"
verbosity: 1
name: do we have a token ?
- name: Enable Agent DNS Settings
include_role:
name: set_ppdm_common_settings
vars:
data:
id: APP_AGENT_SETTING
properties:
- name: enableLookups
value: 'false'
type: BOOLEAN