Git Product home page Git Product logo

ansible-role-netplan's Introduction

Netplan Role

⚠️ This project is archived! ⚠️

This role has been migrated to our hifis.toolkit collection:

CI Status Ansible Role: hifis.netplan Ansible Role Downloads Apache-2.0 Licensed Latest release

Ansible role to install and configure Netplan.

Requirements

None.

Role Variables

Mandatory Variables to be Set that are Not Set with Defaults

Sample Network Configuration

Sample configuration to set up networking with Netplan:

netplan_ethernets:
  - interface_name: 'eth0'
    dhcp4: 'no'
    routes:
      - to: 'default'
        via: '10.123.0.1'
    addresses:
      - '10.123.0.10/24'
    nameservers:
      addresses:
        - '8.8.8.8'
        - '9.9.9.9'
      search:
        - 'domain.local'
        - 'domain.name'

Variables that are Set with Defaults

Flag to delete any pre-existing Netplan configuration files

Flag decides on whether pre-existing Netplan configuration files should be deleted:

netplan_remove_existing_configs: true

Name of the Netplan Configuration File Template

Name of the template providing the Netplan configuration file:

netplan_configuration_file_template: 'config.yaml.j2'

Directory of the Netplan Configuration Files

Directory of the Netplan configuration files:

netplan_configuration_dir: '/etc/netplan'

Name of the Netplan Configuration File

Name of the Netplan configuration file:

netplan_configuration_file: 'config.yaml'

Path to the Netplan Configuration File

Path to the Netplan configuration file:

netplan_configuration_file_path: "{{ (netplan_configuration_dir, netplan_configuration_file) | path_join }}"

Packages to be Installed

List of packages that need to be installed:

netplan_packages:
  - 'netplan.io'

Package ifupdown Network Configuration File

Network configuration file that is present if networking is managed by package ifupdown:

ifupdown_ifstate_file: '/run/network/ifstate'

Troubleshooting

Cleaning Up: Please Uninstall Package ifupdown Manually

Before the package ifupdown can be safely removed netplan networking needs to be properly configured. If the package is removed too early, the role will hang.

For that reason this role does not handle the removal of the ifupdown package.

Limitations

Bootstrapping Network Configurations is not Supported

Please note that networking configurations can not be bootstrapped during role execution. The respective managed nodes need networking to be configured beforehand.

No support for changing the IP over which Ansible connects

Be aware that this role does not support changing the IP addresses over which Ansible connects out of the box. If you change the IP address over which Ansible connects, you might end up in a hanging role as soon as netplan apply is executed. Ansible loses its SSH connection in that case.

Dependencies

None.

License

Apache-2.0

Author Information

HIFIS Software Team

ansible-role-netplan's People

Contributors

christianhueserhzdr avatar chrisvanmeer avatar dependabot[bot] avatar normo avatar tobiashuste avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

ansible-role-netplan's Issues

Replace deprecated gateway4 by routes

gateway4 is deprected and should be replaced by routes instead.

gateway4: "192.168.10.1"

needs to be converted to

routes:
  - to: default
    via: "192.168.10.1"

Molecule folder not linted by molecule

When providing . as the folder path of the lintables to ansible-lint it does not lint the folder molecule/default containing converge.yml, prepare.yml, verify.yml, hence folder molecule/ need to be added to the ansible-lint call in the molecule lint commands.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.