First working release
commit
6bbdbe7cf9
|
@ -0,0 +1,9 @@
|
||||||
|
# Changelog
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
### Added
|
||||||
|
- Inital release
|
|
@ -0,0 +1,44 @@
|
||||||
|
OpenBSD network
|
||||||
|
===============
|
||||||
|
|
||||||
|
An Ansible role for configuring network on OpenBSD.
|
||||||
|
|
||||||
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
------------
|
||||||
|
|
||||||
|
An installed OpenBSD system with python in it.
|
||||||
|
|
||||||
|
Role Variables
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Example configuration. Follow OpenBSD documentation to construct yours.
|
||||||
|
```yaml
|
||||||
|
# This is how typical router configuration looks like
|
||||||
|
openbsd_network_interfaces:
|
||||||
|
em0: ["dhcp"]
|
||||||
|
em1: ["up"]
|
||||||
|
em2: ["up"]
|
||||||
|
em3: ["up"]
|
||||||
|
em4: ["up"]
|
||||||
|
vether0: ["inet 192.168.0.1 255.255.255.0"]
|
||||||
|
bridge0:
|
||||||
|
- add vether0
|
||||||
|
- add em1
|
||||||
|
- add em2
|
||||||
|
- add em3
|
||||||
|
- add em4
|
||||||
|
- up
|
||||||
|
```
|
||||||
|
|
||||||
|
### TODO:
|
||||||
|
What to do on configuration changes. Could be "restart", "reload" or "nothing". Variable is mandatory.
|
||||||
|
```yaml
|
||||||
|
networkd_apply_action: "restart"
|
||||||
|
```
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
|
||||||
|
MIT
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: Network | Apply configuration
|
||||||
|
shell: ":"
|
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: Network | Deploy network configs
|
||||||
|
template:
|
||||||
|
src: hostname.if.j2
|
||||||
|
dest: "/etc/hostname.{{ item.key }}"
|
||||||
|
mode: 0640
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
with_dict: "{{ openbsd_network_interfaces }}"
|
||||||
|
#notify: Network | Apply
|
|
@ -0,0 +1,4 @@
|
||||||
|
# {{ ansible_managed | d('Ansible managed') }}
|
||||||
|
{% for line in item.value %}
|
||||||
|
{{ line }}
|
||||||
|
{% endfor %}
|
Loading…
Reference in New Issue