Host provisioning integrations with netbox

This commit is contained in:
2020-07-07 16:19:18 -04:00
parent 5afdb44488
commit 67cc6ad8a5
6 changed files with 87 additions and 303 deletions

42
pimgmt.yml Normal file
View File

@@ -0,0 +1,42 @@
---
# Configure a Raspberry Pi running Fedora 32+ for Management functions.
- name: Configure interfaces
hosts: pimgmt
gather_facts: false
connection: local
vars:
network_provider: nm
tasks:
- set_fact:
network_connections: >-
{{ network_connections|default([]) + [{
'name': item.name,
'state': item.enabled |ternary('up','down')
}] }}
loop: "{{ interfaces }}"
- debug:
msg: "Connections = {{ network_connections }}"
# - name: Set Up DHCP System
# hosts: dhcp-server
# become: true
# tasks:
# - name: DHCP Daemon is installed
# apt:
# name: isc-dhcp-server
# state: latest
# notify: Restart DHCPD
# - name: Generate dhcpd.conf
# template:
# src: dhcpd.conf.j2
# dest: "{{ dhcpd_conf_path }}"
# handlers:
# - name: Restart DHCPD
# service:
# name: isc-dhcpd-server
# state: restarted