-
-
Save jvanderaa/5d890fc7906390e1dfdc01d297336965 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: "TASK 200: NETBOX >> Add temporary interface" | |
netbox.netbox.netbox_device_interface: | |
netbox_url: "{{ lookup('ENV', 'NETBOX_URL') }}" | |
netbox_token: "{{ lookup('ENV', 'NETBOX_API_KEY') }}" | |
data: | |
device: "{{ inventory_hostname }}" | |
name: Temporary_Interface | |
form_factor: Virtual | |
state: present | |
- name: "TASK 210: NETBOX >> ADD IP ADDRESS OF ANSIBLE HOST" | |
netbox.netbox.netbox_ip_address: | |
netbox_url: "{{ lookup('ENV', 'NETBOX_URL') }}" | |
netbox_token: "{{ lookup('ENV', 'NETBOX_API_KEY') }}" | |
data: | |
family: 4 | |
address: "{{ ansible_host }}/24" | |
status: active | |
interface: | |
name: Temporary_Interface | |
device: "{{ inventory_hostname }}" | |
- name: "TASK 220: NETBOX >> ASSOCIATE IP ADDRESS TO DEVICE" | |
netbox.netbox.netbox_device: | |
netbox_url: "{{ lookup('ENV', 'NETBOX_URL') }}" | |
netbox_token: "{{ lookup('ENV', 'NETBOX_API_KEY') }}" | |
data: | |
name: "{{ inventory_hostname }}" | |
device_type: "{{ ansible_facts['net_model'] }}" | |
platform: IOS | |
serial: "{{ ansible_facts['net_serialnum'] }}" | |
status: Active | |
primary_ip4: "{{ ansible_host }}/24" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment