• Stars
    star
    128
  • Rank 281,044 (Top 6 %)
  • Language Jinja
  • License
    MIT License
  • Created over 6 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ansible role to manage Netplan

Table of Contents generated with DocToc

ansible-netplan

An Ansible role to manage Netplan

Requirements

You probably want to run the role with become: true

Role Variables

defaults/main.yml

Dependencies

Example Playbook

The following is a trivial example of a playbook that sets a single network interface. See defaults/main.yml for a full list of values that can be set for this role.

---
- hosts: ...your hosts...
  any_errors_fatal: true
  roles:
    - role: mrlesmithjr.netplan
      become: yes
      # This role will do nothing unless netplan_enabled is true.
      netplan_enabled: true
      
      # This should point to an existing netplan configuration file 
      # on your system which this role will overwrite, 
      # or to a nonexistent file which netplan is aware of.
      #
      # The default is /etc/netplan/config.yaml.
      netplan_config_file: /etc/netplan/my-awesome-netplan.yaml
      
      # Ubuntu 18.04, for example, defaults to using networkd.
      netplan_renderer: networkd
      # Simple network configuration to add a single network interface.
      # Configuration defined bellow will be written to the file defined
      # above in `netplan_config_file`.
      netplan_configuration:
        network:
          version: 2
          ethernets:
            enp28s0f7:
              addresses:
                - 10.11.12.99/24

Using vaulted variables

Vault encrypted variables need to be defined outside the netplan_configuration variable to be evaluated.

netplan_configuration:
  network:
    version: 2
    tunnels:
      wg_test:
        mode: wireguard
        key: "{{ my_wireguard_private_key }}"
      ....

my_wireguard_private_key: !vault |
          31366530666465373834386563636465636135323562303866363333333865376330303130363162
          ....

License

MIT

Author Information

Larry Smith Jr.

Buy Me A Coffee

More Repositories

1

Ansible

Python
167
star
2

ansible-rpi-k8s-cluster

Deploy Raspberry Pi Kubernetes cluster using Ansible
Jinja
144
star
3

packer-templates

Shell
133
star
4

vagrant-box-templates

Python
129
star
5

ansible-mariadb-galera-cluster

Jinja
126
star
6

graylog2

Shell
119
star
7

ansible-vsphere-management

Python
81
star
8

Packer-For-vSphere-and-More

Shell
77
star
9

ansible-netdata

An Ansible role to install/configure Netdata
Jinja
76
star
10

ansible-manage-lvm

Ansible role to manage LVM Groups/Logical Volumes
Python
76
star
11

Logstash_Kibana3

Shell
60
star
12

ansible-mdadm

Jinja
54
star
13

ansible-kvm

Jinja
51
star
14

ansible-rabbitmq

Ansible role to install/configure RabbitMQ
Erlang
46
star
15

ansible-zfs

Installs and configures ZFS On Linux
Shell
44
star
16

ansible-frr

Jinja
37
star
17

packer-templates-revisited

Shell
36
star
18

cacti

This repo will contain some of my templates and other goodies
36
star
19

ansible-config-interfaces

Jinja
33
star
20

ansible-samba

Jinja
32
star
21

ansible-nginx-load-balancer

Python
23
star
22

cookiecutter-ansible-role

A cookiecutter project template for Ansible roles
22
star
23

ansible-maas

An Ansible role to install/configure MAAS
22
star
24

ansible-openldap

Jinja
21
star
25

vagrant-ansible-routing-template

Python
21
star
26

dotfiles

Shell
21
star
27

vagrant-vault-consul-docker-monitoring

Shell
20
star
28

ansible-drbd

Jinja
20
star
29

ansible-opennms

Jinja
20
star
30

ansible-squid

Ansible role to install/configure Squid Proxy
Jinja
20
star
31

ansible-guacamole

Ansible role to install/configure Guacamole
Jinja
19
star
32

vagrant-ansible-docker-swarm

Python
19
star
33

ansible-dnsmasq

Enter description of Ansible role
Jinja
18
star
34

developers-workstation-setup

Shell
17
star
35

ansible-pacemaker

Jinja
16
star
36

terraform-to-ansible

Terraform to Ansible - Consume Terraform State as Ansible Inventory
Python
16
star
37

ansible-ipset

Jinja
16
star
38

ansible-k8s

HTML
15
star
39

ansible-docker

Enter description of Ansible role
Jinja
15
star
40

ansible-snort

Shell
14
star
41

ansible-kea-dhcp

14
star
42

ansible-motd

Shell
14
star
43

ansible-apt-sources

Enter description of Ansible role
Jinja
14
star
44

ansible-freenas

An Ansible role to manage FreeNAS
14
star
45

ansible-elkstack

Shell
14
star
46

ansible-cloud-init

Jinja
14
star
47

python-powerdns-management

Jinja
13
star
48

ansible-suricata

Shell
12
star
49

ansible-cmdb

PLpgSQL
12
star
50

ansible-control-machine

12
star
51

packer-builder

Packer Builder - Making Packer Building More Consumable
Python
11
star
52

ansible-logstash

11
star
53

ansible-manage-ssh-keys

11
star
54

ansible-chrony

Ansible role to install/configure Chrony
Jinja
11
star
55

ansible-glusterfs

Jinja
11
star
56

ansible-shorewall

10
star
57

hashi-learning

Shell
10
star
58

ansible-nfs-server

Jinja
10
star
59

ansible-prometheus

Ansible role to install/configure Prometheus
Jinja
10
star
60

ansible-stackstorm

Ruby
10
star
61

ansible-base

HTML
9
star
62

ansible-mongodb

8
star
63

ansible-apt-mirror

Jinja
8
star
64

ansible-windows-remote-desktop

8
star
65

terraform-builder

Terraform Builder - Build consistent Terraform configurations
Python
8
star
66

ansible-consul

Ansible role to install/configure Consul
Jinja
8
star
67

ansible-isc-dhcp

8
star
68

ansible-elasticsearch

An Ansible role to install/configure Elasticsearch
Jinja
8
star
69

ansible-kata-containers

Shell
8
star
70

ansible-openvswitch

8
star
71

vagrant-ansible-gerrit-lab

Shell
8
star
72

ansible-quagga

Shell
7
star
73

ansible-gerrit

7
star
74

ansible-windows-domain-controller

7
star
75

ansible-rundeck

Jinja
7
star
76

netbox

Ansible collection for installing/configuring/managing NetBox
Python
7
star
77

ansible-apache2

Jinja
7
star
78

docker-phpipam

PHP
7
star
79

vagrant-container-templates

Shell
7
star
80

sync-forked-repo

Python
7
star
81

ansible-windows-iis

7
star
82

ansible-collection-system

7
star
83

ansible-elk-processors

7
star
84

ansible-bootstrap-python

6
star
85

ansible-postfix

Jinja
6
star
86

ansible-mesosphere

Shell
6
star
87

ansible-influxdb

An Ansible role to install/configure InfluxDB
Jinja
6
star
88

ansible-es-filebeat

6
star
89

ansible-saltstack

An Ansible role to install/configure SaltStack
Jinja
6
star
90

ansible-awx

HTML
6
star
91

vmware-template-scripts

Shell
6
star
92

ansible-postgresql

Enter description of Ansible role
Jinja
6
star
93

ansible-clone-git-repos

Shell
6
star
94

ansible-jenkins

Ruby
6
star
95

ansible-docker-swarm

6
star
96

vagrant-ansible-k8s

Vagrant Ansible lab for Kubernetes
Ruby
6
star
97

ansible-change-hostname

6
star
98

docker-m1-development

Apple M1 development using Docker
Shell
5
star
99

ansible-mariadb-mysql

Shell
5
star
100

ansible-gitlab-runner

5
star