-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
52 lines (41 loc) · 1.75 KB
/
main.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
- hosts: win
vars:
#################################################
################# MANAGMENT #####################
site_temporal: 5 # site.id that will be used for the gathered devices
device_type : "HP Proliant Gen 10" #The device type that will be used for the gathered devices
device_type_interface: "ge0/4" # The interface Netbox where the IP will be assigned
device_role: "Servidores Fisicos" # The Device Role that will be used for the gathered devices
url_nb: "http://192.168.1.203" # NETBOX URL
token_nb: "4c121d2ed2103e10fd2f4d9532dcb8e040fd0fc9" # NETBOX TOKEN
##################################################
# DEVICE
####################################################
#HOST
hostname: "{{ ansible_hostname }}"
dominio: "{{ ansible_windows_domain }}"
arquitecture: "{{ansible_architecture}}"
version: "{{ ansible_distribution }}"
plataforma: "{{ ansible_os_family }}"
#CPU
cpu_processor_model: "{{ansible_processor[2]}}"
cpu_count: "{{ansible_processor_count}}"
cpu_cores: "{{ansible_processor_cores}}"
cpu_logics: "{{ansible_processor_threads_per_core}}"
#MEMORY
ram_total: "{{ansible_memtotal_mb}}"
##################################################
# NETWORKING
####################################################
ipv4: "{{ ansible_interfaces[item]['ipv4']['address'] }}"
mac: "{{ ansible_interfaces[item]['macaddress'] }}"
interface: "{{ ansible_facts.interfaces[item]['connection_name'] }}"
prefix: "{{ ansible_interfaces[item]['ipv4']['prefix'] }}"
###################################################
gather_facts: yes
roles:
- netbox_devices
- netbox_ipam
- netbox_disk
- netbox_vm_basic