{"id":18446532,"url":"https://github.com/kb-perbyte/config_drift_role","last_synced_at":"2026-03-19T04:25:45.468Z","repository":{"id":113617108,"uuid":"531459615","full_name":"KB-perByte/config_drift_role","owner":"KB-perByte","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-08T11:01:33.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-24T19:35:50.166Z","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-09-01T09:57:43.000Z","updated_at":"2022-09-01T10:06:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"b5c89e5c-9e3a-4b41-9ab3-e515bde68e4a","html_url":"https://github.com/KB-perByte/config_drift_role","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KB-perByte/config_drift_role","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KB-perByte%2Fconfig_drift_role","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KB-perByte%2Fconfig_drift_role/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KB-perByte%2Fconfig_drift_role/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KB-perByte%2Fconfig_drift_role/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KB-perByte","download_url":"https://codeload.github.com/KB-perByte/config_drift_role/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KB-perByte%2Fconfig_drift_role/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29749950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: 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:37.814Z","updated_at":"2026-02-23T18:06:02.163Z","avatar_url":"https://github.com/KB-perByte.png","language":"Jinja","readme":"# config_drift_role\n\nAnsible's role for 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 `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_role\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_role","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkb-perbyte%2Fconfig_drift_role","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkb-perbyte%2Fconfig_drift_role/lists"}