{"id":44525188,"url":"https://github.com/netdevops/hconfig-remediation-ansible","last_synced_at":"2026-02-13T17:58:36.429Z","repository":{"id":45581522,"uuid":"71411081","full_name":"netdevops/hconfig-remediation-ansible","owner":"netdevops","description":"An Ansible Module for utilizing Hierarchical Configuration","archived":false,"fork":false,"pushed_at":"2024-12-20T02:45:13.000Z","size":94,"stargazers_count":13,"open_issues_count":3,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-20T02:45:49.213Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netdevops.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":"2016-10-20T00:34:57.000Z","updated_at":"2024-12-20T02:45:14.000Z","dependencies_parsed_at":"2024-12-20T02:43:41.348Z","dependency_job_id":"7a71792b-4dcf-4b52-88f7-dd1ee1a9a6ea","html_url":"https://github.com/netdevops/hconfig-remediation-ansible","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/netdevops/hconfig-remediation-ansible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netdevops%2Fhconfig-remediation-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netdevops%2Fhconfig-remediation-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netdevops%2Fhconfig-remediation-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netdevops%2Fhconfig-remediation-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netdevops","download_url":"https://codeload.github.com/netdevops/hconfig-remediation-ansible/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netdevops%2Fhconfig-remediation-ansible/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29414277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"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":"2026-02-13T17:58:35.236Z","updated_at":"2026-02-13T17:58:36.418Z","avatar_url":"https://github.com/netdevops.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hconfig-remediation-ansible\nAn Ansible Module for utilizing Hierarchical Configuration\n\n[![CodeFactor](https://www.codefactor.io/repository/github/netdevops/hconfig-remediation-ansible/badge)](https://www.codefactor.io/repository/github/netdevops/hconfig-remediation-ansible)\n\nTesting\n=======\n\n## Install from Github\n\n1. [Install Poetry](https://python-poetry.org/docs/)\n2. Clone from Github: `https://github.com/netdevops/hconfig-remediation-ansible`\n3. Install dependencies: `cd hconfig-remediation-ansible; poetry install`\n4. Create ansible-galaxy collection: `ansible-galaxy collection build -f`\n5. Install ansible-galaxy collection: `ansible-galaxy collection install netdevops-hier_config-*.tar.gz -f`\n6. Execute example playbook: `cd example; ansible-playbook -i inventory test.pb.yml -v`\n\n## Example Output\n\n```bash\n% ansible-playbook -i inventory test.pb.yml -v\nNo config file found; using defaults\n\nPLAY [all] ****************************************************************************************************************************************************************************************\n\nTASK [BUILD REMEDIATION CONFIG WITHOUT TAGS] ******************************************************************************************************************************************************\nchanged: [router1] =\u003e {\"changed\": true, \"response\": \"aaa group server tacacs+ MYTACACS\\n  no server-private 10.0.0.1 port 49\\n  server-private 10.0.0.2 port 49\\n    key secretkey\\nipv4 access-list vty\\n  permit ip host 10.4.1.9 any\\n  permit ip any 10.4.106.0 0.0.0.255\\n  permit ip 10.0.150.0 0.127.0.255 any\\nrouter ospf 65000\\n  auto-cost reference-bandwidth 1000000\\nrouter bgp 65000\\n  no neighbor RR-Client remote-as 65000\\n  no neighbor RR-Client update-source Loopback0\\n  no maximum-paths ibgp 16\\n  neighbor RR-CLIENT peer-group\\n  neighbor RR-CLIENT remote-as 65000\\n  neighbor RR-CLIENT update-source Loopback0\\n  neighbor 10.4.2.234 remote-as 65000\\n  neighbor 10.4.2.234 peer-group RR-CLIENT\\n  neighbor 10.4.2.234 description RR1B\\n  neighbor 10.4.2.235 peer-group RR-CLIENT\\n  address-family ipv4\\n    no neighbor RR-Client soft-reconfiguration inbound\\n    neighbor RR-CLIENT soft-reconfiguration inbound\\n    neighbor 10.4.2.234 activate\\n    maximum-paths ibgp 16\\n    exit-address-family\"}\n\nTASK [BUILD REMEDIATION CONFIG WITH INCLUDE TAGS] *************************************************************************************************************************************************\nchanged: [router1] =\u003e {\"changed\": true, \"response\": \"ipv4 access-list vty\\n  permit ip host 10.4.1.9 any\\n  permit ip any 10.4.106.0 0.0.0.255\\n  permit ip 10.0.150.0 0.127.0.255 any\\nrouter bgp 65000\\n  neighbor RR-CLIENT peer-group\\n  neighbor RR-CLIENT remote-as 65000\\n  neighbor RR-CLIENT update-source Loopback0\\n  neighbor 10.4.2.234 remote-as 65000\\n  neighbor 10.4.2.234 peer-group RR-CLIENT\\n  neighbor 10.4.2.234 description RR1B\\n  neighbor 10.4.2.235 peer-group RR-CLIENT\\n  address-family ipv4\\n    neighbor RR-CLIENT soft-reconfiguration inbound\\n    neighbor 10.4.2.234 activate\\n    maximum-paths ibgp 16\\n    no neighbor RR-Client soft-reconfiguration inbound\\n    exit-address-family\\n  no neighbor RR-Client remote-as 65000\\n  no neighbor RR-Client update-source Loopback0\"}\n\nTASK [BUILD REMEDIATION CONFIG WITH EXCLUDE TAGS] *************************************************************************************************************************************************\nchanged: [router1] =\u003e {\"changed\": true, \"response\": \"ipv4 access-list vty\\n  permit ip host 10.4.1.9 any\\n  permit ip any 10.4.106.0 0.0.0.255\\n  permit ip 10.0.150.0 0.127.0.255 any\\nrouter ospf 65000\\n  auto-cost reference-bandwidth 1000000\\nrouter bgp 65000\\n  no maximum-paths ibgp 16\\n  neighbor RR-CLIENT peer-group\\n  neighbor RR-CLIENT remote-as 65000\\n  neighbor RR-CLIENT update-source Loopback0\\n  neighbor 10.4.2.234 remote-as 65000\\n  neighbor 10.4.2.234 peer-group RR-CLIENT\\n  neighbor 10.4.2.234 description RR1B\\n  neighbor 10.4.2.235 peer-group RR-CLIENT\\n  address-family ipv4\\n    neighbor RR-CLIENT soft-reconfiguration inbound\\n    neighbor 10.4.2.234 activate\\n    maximum-paths ibgp 16\\n    no neighbor RR-Client soft-reconfiguration inbound\\n    exit-address-family\\n  no neighbor RR-Client remote-as 65000\\n  no neighbor RR-Client update-source Loopback0\"}\n\nTASK [BUILD REMEDIATION CONFIG WITH EXCLUDE TAGS] *************************************************************************************************************************************************\nchanged: [router1] =\u003e {\"changed\": true, \"response\": \"ipv4 access-list vty\\n  permit ip host 10.4.1.9 any\\n  permit ip any 10.4.106.0 0.0.0.255\\n  permit ip 10.0.150.0 0.127.0.255 any\\nrouter bgp 65000\\n  neighbor RR-CLIENT peer-group\\n  neighbor RR-CLIENT remote-as 65000\\n  neighbor RR-CLIENT update-source Loopback0\\n  neighbor 10.4.2.234 remote-as 65000\\n  neighbor 10.4.2.234 peer-group RR-CLIENT\\n  neighbor 10.4.2.234 description RR1B\\n  neighbor 10.4.2.235 peer-group RR-CLIENT\\n  address-family ipv4\\n    neighbor RR-CLIENT soft-reconfiguration inbound\\n    neighbor 10.4.2.234 activate\\n    maximum-paths ibgp 16\\n    no neighbor RR-Client soft-reconfiguration inbound\\n    exit-address-family\\n  no neighbor RR-Client remote-as 65000\\n  no neighbor RR-Client update-source Loopback0\"}\n\nPLAY RECAP ****************************************************************************************************************************************************************************************\nrouter1                    : ok=4    changed=4    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0\n```\n## Example Playbook\n```yaml\n---\n- hosts: all\n  gather_facts: False\n  connection: local\n\n  tasks:\n  - name: BUILD REMEDIATION CONFIG WITHOUT TAGS\n    netdevops.hier_config.remediation:\n      hostname: router1.rtr\n      running_config: router1-running.conf\n      generated_config: router1-generated.conf\n      remediation_config: router1-remediation.conf\n      platform: \"CISCO_XR\"\n\n  - name: BUILD REMEDIATION CONFIG WITH INCLUDE TAGS\n    netdevops.hier_config.remediation:\n      hostname: router1.rtr\n      running_config: router1-running.conf\n      generated_config: router1-generated.conf\n      remediation_config: router1-remediation-with-include-tags.conf\n      platform: \"CISCO_XR\"\n      include_tags:\n        - push\n\n  - name: BUILD REMEDIATION CONFIG WITH EXCLUDE TAGS\n    netdevops.hier_config.remediation:\n      hostname: router1.rtr\n      running_config: router1-running.conf\n      generated_config: router1-generated.conf\n      remediation_config: router1-remediation-with-exclude-tags.conf\n      platform: \"CISCO_XR\"\n      exclude_tags:\n        - ignore\n\n  - name: BUILD REMEDIATION CONFIG WITH BOTH INCLUDE AND EXCLUDE TAGS\n    netdevops.hier_config.remediation:\n      hostname: router1.rtr\n      running_config: router1-running.conf\n      generated_config: router1-generated.conf\n      remediation_config: router1-remediation-with-tags.conf\n      platform: \"CISCO_XR\"\n      include_tags:\n        - push\n      exclude_tags:\n        - ignore\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetdevops%2Fhconfig-remediation-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetdevops%2Fhconfig-remediation-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetdevops%2Fhconfig-remediation-ansible/lists"}