-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsns-basic-provisioning.yaml
63 lines (55 loc) · 1.42 KB
/
sns-basic-provisioning.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
- hosts: localhost
connection: local
vars:
appliance:
host: 10.60.3.235
user: admin
password: adminadmin
sslverifyhost: False
ntp:
host: fr.pool.ntp.org
ip: 178.33.214.167
dns:
server1: 8.8.8.8
server2: 8.8.4.4
systemName: appliance1
tasks:
- name: Get NTP servers
sns_command:
appliance: "{{ appliance }}"
command: CONFIG NTP SERVER LIST
register: ntpservers
- name: Extract ntp list
sns_getconf:
result: "{{ ntpservers.result }}"
section: Result
register: ntplist
- name: Get DNS servers
sns_command:
appliance: "{{ appliance }}"
command: CONFIG DNS SERVER LIST
register: dnsservers
- name: Extract DNS list
sns_getconf:
result: "{{ dnsservers.result }}"
section: Server
register: dnslist
- name: Get ACL list
sns_command:
appliance: "{{ appliance }}"
command: CONFIG WEBADMIN ACCESS SHOW LIST
register: acl
- name: Extract DNS list
sns_getconf:
result: "{{ acl.result }}"
section: Result
register: acllist
- name: Generate configuration script
template:
src: sns-basic-provisioning.script
dest: /tmp/basic.script
- name: Execute script
sns_command:
appliance: "{{ appliance }}"
script: "{{ lookup('file', '/tmp/basic.script') }}"