Host provisioning integrations with netbox
This commit is contained in:
42
pimgmt.yml
Normal file
42
pimgmt.yml
Normal 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
|
||||
Reference in New Issue
Block a user