{"id":18446538,"url":"https://github.com/kb-perbyte/config_drift_l2_interfaces","last_synced_at":"2026-01-28T00:04:19.567Z","repository":{"id":113617092,"uuid":"475050445","full_name":"KB-perByte/config_drift_l2_interfaces","owner":"KB-perByte","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-29T13:23:53.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T21:36:27.217Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KB-perByte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-03-28T14:55:17.000Z","updated_at":"2022-03-28T16:17:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"82e70fdd-276c-41a3-8dc8-eff5cf2c7454","html_url":"https://github.com/KB-perByte/config_drift_l2_interfaces","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KB-perByte/config_drift_l2_interfaces","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KB-perByte%2Fconfig_drift_l2_interfaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KB-perByte%2Fconfig_drift_l2_interfaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KB-perByte%2Fconfig_drift_l2_interfaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KB-perByte%2Fconfig_drift_l2_interfaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KB-perByte","download_url":"https://codeload.github.com/KB-perByte/config_drift_l2_interfaces/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KB-perByte%2Fconfig_drift_l2_interfaces/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28828168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"ssl_error","status_checked_at":"2026-01-27T23:25:58.379Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-06T07:09:38.201Z","updated_at":"2026-01-28T00:04:19.541Z","avatar_url":"https://github.com/KB-perByte.png","language":"Jinja","readme":"# config_drift_l2_interfaces\n\nAnsible role to preserve configuration applied to interfaces using on box templating `source template`, by collecting the configuration converting it to structured data as source of truth, followed by negation of the source templates per interface and re-applying the configuration back to the device using resource modules.\nHelps migrating on box l2 \u0026 interface configuration from on box templates based configuration.\n\n## Execution steps\n\n### Part 1\n\n- Fetching `derived-config` configuration.\n- Feed it to the parsed state of ios.interfaces and ios.l2_interfaces resource module.\n- Store the source of truth generated in corresponding yaml files.\n\n### Part 2\n\n- Identify the interfaces using templates using with `running-config`.\n- Generate a template based configuration for the interfaces using templates.\n- Negate the templates per interface using the config generated.\n\n### Part 3\n\n- Apply back the configuration with ios.interfaces and ios.l2_interfaces resource module.\n\n## Example Playbook\n\nfile : play.yml\n\n```\n  tasks:\n  - name: Build source of truth based on derived config\n    ansible.builtin.include_role: \u0026ref_role\n      name: config_drift_l2_interfaces\n    vars:\n      action: build source of truth\n\n  - name: Negate existing source templates per interface\n    ansible.builtin.include_role: *ref_role\n    vars:\n      action: negate existing templates\n\n  - name: Apply back configuration with resource module\n    ansible.builtin.include_role: *ref_role\n    vars:\n      action: apply back configuration\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkb-perbyte%2Fconfig_drift_l2_interfaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkb-perbyte%2Fconfig_drift_l2_interfaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkb-perbyte%2Fconfig_drift_l2_interfaces/lists"}