{"id":14984446,"url":"https://github.com/mrlesmithjr/ansible-netplan","last_synced_at":"2025-04-12T22:37:19.975Z","repository":{"id":40297009,"uuid":"129637254","full_name":"mrlesmithjr/ansible-netplan","owner":"mrlesmithjr","description":"Ansible role to manage Netplan","archived":false,"fork":false,"pushed_at":"2024-11-05T02:56:48.000Z","size":94,"stargazers_count":139,"open_issues_count":0,"forks_count":86,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-04T02:08:28.593Z","etag":null,"topics":["ansible","ansible-role"],"latest_commit_sha":null,"homepage":null,"language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrlesmithjr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-15T18:10:03.000Z","updated_at":"2025-03-03T09:16:57.000Z","dependencies_parsed_at":"2023-02-19T10:30:52.373Z","dependency_job_id":"6600efb8-9724-4e76-b87f-9bb1993abef9","html_url":"https://github.com/mrlesmithjr/ansible-netplan","commit_stats":{"total_commits":47,"total_committers":17,"mean_commits":2.764705882352941,"dds":0.5319148936170213,"last_synced_commit":"f0167f5e4d8318e89b7b69eeb6b065d8686f8e8d"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-netplan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-netplan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-netplan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-netplan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrlesmithjr","download_url":"https://codeload.github.com/mrlesmithjr/ansible-netplan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643007,"owners_count":21138353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role"],"created_at":"2024-09-24T14:09:04.510Z","updated_at":"2025-04-12T22:37:19.953Z","avatar_url":"https://github.com/mrlesmithjr.png","language":"Jinja","funding_links":["https://www.buymeacoffee.com/mrlesmithjr"],"categories":[],"sub_categories":[],"readme":"\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n**Table of Contents** _generated with [DocToc](https://github.com/thlorenz/doctoc)_\n\n- [ansible-netplan](#ansible-netplan)\n  - [Requirements](#requirements)\n  - [Role Variables](#role-variables)\n  - [Dependencies](#dependencies)\n  - [Example Playbook](#example-playbook)\n  - [License](#license)\n  - [Author Information](#author-information)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n# ansible-netplan\n\nAn [Ansible](https://www.ansible.com) role to manage [Netplan](https://netplan.io)\n\n## Requirements\n\nYou probably want to run the role with `become: true`\n\n## Role Variables\n\n[defaults/main.yml](defaults/main.yml)\n\n## Dependencies\n\n## Example Playbook\n\nThe following is a trivial example of a playbook that sets a single\nnetwork interface.  See defaults/main.yml for a full list of values\nthat can be set for this role.\n\n```yaml\n---\n- hosts: ...your hosts...\n  any_errors_fatal: true\n  roles:\n    - role: mrlesmithjr.netplan\n      become: yes\n      # This role will do nothing unless netplan_enabled is true.\n      netplan_enabled: true\n      \n      # This should point to an existing netplan configuration file \n      # on your system which this role will overwrite, \n      # or to a nonexistent file which netplan is aware of.\n      #\n      # The default is /etc/netplan/config.yaml.\n      netplan_config_file: /etc/netplan/my-awesome-netplan.yaml\n      \n      # Ubuntu 18.04, for example, defaults to using networkd.\n      netplan_renderer: networkd\n      # Simple network configuration to add a single network interface.\n      # Configuration defined bellow will be written to the file defined\n      # above in `netplan_config_file`.\n      netplan_configuration:\n        network:\n          version: 2\n          ethernets:\n            enp28s0f7:\n              addresses:\n                - 10.11.12.99/24\n```\n## Using vaulted variables\nVault encrypted variables need to be defined outside the `netplan_configuration` variable to be evaluated.\n\n```yaml\nnetplan_configuration:\n  network:\n    version: 2\n    tunnels:\n      wg_test:\n        mode: wireguard\n        key: \"{{ my_wireguard_private_key }}\"\n      ....\n\nmy_wireguard_private_key: !vault |\n          31366530666465373834386563636465636135323562303866363333333865376330303130363162\n          ....\n```\n\n## License\n\nMIT\n\n## Author Information\n\nLarry Smith Jr.\n\n- [EverythingShouldBeVirtual](http://everythingshouldbevirtual.com)\n- [@mrlesmithjr](https://www.twitter.com/mrlesmithjr)\n- \u003cmailto:mrlesmithjr@gmail.com\u003e\n\n\u003ca href=\"https://www.buymeacoffee.com/mrlesmithjr\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlesmithjr%2Fansible-netplan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrlesmithjr%2Fansible-netplan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlesmithjr%2Fansible-netplan/lists"}