v0.0.2
This commit is contained in:
38
roles/ericomeehan.configure_network/README.md
Normal file
38
roles/ericomeehan.configure_network/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
ericomeehan.configure_network
|
||||
=========
|
||||
|
||||
Role to configure network interfaces for eom.dev.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
None
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
network_interfaces: A string defining network interfaces for a Debian node
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
None
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
Eric O'Neill Meehan
|
||||
2
roles/ericomeehan.configure_network/defaults/main.yml
Normal file
2
roles/ericomeehan.configure_network/defaults/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# defaults file for configure_network
|
||||
2
roles/ericomeehan.configure_network/handlers/main.yml
Normal file
2
roles/ericomeehan.configure_network/handlers/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# handlers file for configure_network
|
||||
34
roles/ericomeehan.configure_network/meta/main.yml
Normal file
34
roles/ericomeehan.configure_network/meta/main.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description: your role description
|
||||
company: your company (optional)
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||
# - BSD-3-Clause (default)
|
||||
# - MIT
|
||||
# - GPL-2.0-or-later
|
||||
# - GPL-3.0-only
|
||||
# - Apache-2.0
|
||||
# - CC-BY-4.0
|
||||
license: license (GPL-2.0-or-later, MIT, etc)
|
||||
|
||||
min_ansible_version: 2.1
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
# tasks file for Debian_firewall
|
||||
- name: Enable nftables
|
||||
service:
|
||||
name: nftables
|
||||
state: started
|
||||
enabled: true
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
# tasks file for Debian_interfaces
|
||||
- name: Configure network interfaces for a Debian node
|
||||
template:
|
||||
src: "Debian_interfaces.j2"
|
||||
dest: /etc/network/interfaces
|
||||
7
roles/ericomeehan.configure_network/tasks/main.yml
Normal file
7
roles/ericomeehan.configure_network/tasks/main.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
# tasks file for configure_network
|
||||
- include_tasks: Debian_interfaces.yml
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- include_tasks: Debian_firewall.yml
|
||||
when: ansible_os_family == "Debian"
|
||||
@@ -0,0 +1,10 @@
|
||||
# This file describes the network interfaces available on your system
|
||||
# and how to activate them. For more information, see interfaces(5).
|
||||
|
||||
source /etc/network/interfaces.d/*
|
||||
|
||||
# The loopback network interface
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
{{ network_interfaces }}
|
||||
2
roles/ericomeehan.configure_network/tests/inventory
Normal file
2
roles/ericomeehan.configure_network/tests/inventory
Normal file
@@ -0,0 +1,2 @@
|
||||
localhost
|
||||
|
||||
5
roles/ericomeehan.configure_network/tests/test.yml
Normal file
5
roles/ericomeehan.configure_network/tests/test.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- configure_network
|
||||
2
roles/ericomeehan.configure_network/vars/main.yml
Normal file
2
roles/ericomeehan.configure_network/vars/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# vars file for configure_network
|
||||
Reference in New Issue
Block a user