Skip to content

Instantly share code, notes, and snippets.

@jvanderaa
Created December 3, 2020 02:41
Show Gist options
  • Save jvanderaa/de4a57f05d963f9291c3f3a4adbb0f45 to your computer and use it in GitHub Desktop.
Save jvanderaa/de4a57f05d963f9291c3f3a4adbb0f45 to your computer and use it in GitHub Desktop.
- name: "TASK 20: SETUP MANUFACTURERS"
netbox.netbox.netbox_manufacturer:
netbox_url: "{{ lookup('ENV', 'NETBOX_URL') }}"
netbox_token: "{{ lookup('ENV', 'NETBOX_API_KEY') }}"
data:
name: "{{ manufacturer }}"
loop: "{{ manufacturers }}"
loop_control:
loop_var: manufacturer
- name: "TASK 30: SETUP DEVICE TYPES"
netbox.netbox.netbox_device_type:
netbox_url: "{{ lookup('ENV', 'NETBOX_URL') }}"
netbox_token: "{{ lookup('ENV', 'NETBOX_API_KEY') }}"
data:
model: "{{ device_type.model }}"
manufacturer: "{{ device_type.manufacturer }}"
slug: "{{ device_type.slug }}"
part_number: "{{ device_type.part_number }}"
is_full_depth: "{{ device_type.full_depth }}"
loop: "{{ device_types }}"
loop_control:
loop_var: device_type
label: "{{ device_type['model'] }}"
- name: "TASK 40: SETUP PLATFORMS"
netbox.netbox.netbox_platform:
netbox_url: "{{ lookup('ENV', 'NETBOX_URL') }}"
netbox_token: "{{ lookup('ENV', 'NETBOX_API_KEY') }}"
data:
name: "{{ platform.name }}"
slug: "{{ platform.slug }}"
loop: "{{ platforms }}"
loop_control:
loop_var: platform
label: "{{ platform['name'] }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment