-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_env.yaml
38 lines (29 loc) · 928 Bytes
/
setup_env.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
---
- hosts: localhost
gather_facts: no
connection: local
vars:
version: 1.0.0
vars_prompt:
- name: "host_addr"
prompt: "What is the IP or FQDN of your EOS device?"
private: no
- name: "transport"
prompt: "How would you like to connect to the switch? [ssh|http|https]"
private: no
- name: "username"
prompt: "EOS Username?"
private: no
- name: "password"
prompt: "EOS password?"
private: yes
- name: "authorize"
prompt: "Do we need to run 'enable' upon login? [yes|no]"
private: no
tasks:
- name: Generate group_vars/all file
template: dest='group_vars/all.yaml' src=setup/groupvarsall.j2 backup=yes
- name: Generate hosts file
template: dest='./hosts' src=setup/hosts.j2 backup=yes
- name: Generate hostvars file
template: dest='host_vars/{{ host_addr }}.yaml' src=setup/hostvars.j2 backup=yes