42 lines
969 B
YAML
42 lines
969 B
YAML
---
|
|
# 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 |