{"id":18337410,"url":"https://github.com/nmake/ansible-connect","last_synced_at":"2025-04-06T04:36:23.572Z","repository":{"id":46814141,"uuid":"189466817","full_name":"nmake/ansible-connect","owner":"nmake","description":"Send commands to a single network device and return the output.","archived":false,"fork":false,"pushed_at":"2021-09-23T23:37:09.000Z","size":55,"stargazers_count":4,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"devel","last_synced_at":"2025-03-21T17:54:31.345Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nmake.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}},"created_at":"2019-05-30T18:56:46.000Z","updated_at":"2022-04-21T11:47:48.000Z","dependencies_parsed_at":"2022-07-22T19:02:45.164Z","dependency_job_id":null,"html_url":"https://github.com/nmake/ansible-connect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmake%2Fansible-connect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmake%2Fansible-connect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmake%2Fansible-connect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmake%2Fansible-connect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nmake","download_url":"https://codeload.github.com/nmake/ansible-connect/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247435038,"owners_count":20938530,"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":[],"created_at":"2024-11-05T20:11:07.291Z","updated_at":"2025-04-06T04:36:18.259Z","avatar_url":"https://github.com/nmake.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible-connect\n\nThis project provides a direcl way to consume the `network_cli` connection\nplugin that ships with Ansible.  It provides a command line executable for\nsending a command to a remote device and returning its output.\n\nThis script has been tested to work with Ansible 2.8 or later and Python 3.6\n\nThis script is made available for free as-is for testing only and is not\nmaintaned or supported\n\n\n## Example usage\n\n```\n$ ansible-connect --help\nusage: ansible-connect [-h] [-p PORT] [-u USERNAME] [-P PASSWORD] [-t TIMEOUT]\n                       [-n NETWORK_OS] [--json]\n                       [command [command ...]] host\n\npositional arguments:\n  command               Command(s) to send to the remote device\n  host                  Hostname or IP address of the remote host\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -p PORT, --port PORT  The SSH port to connect the to (default=22)\n  -u USERNAME, --username USERNAME\n                        The username used to authenticate with\n  -P PASSWORD, --password PASSWORD\n                        The password used to authenticate with\n  -t TIMEOUT, --timeout TIMEOUT\n                        The timeout value for the connection (default=30)\n  -n NETWORK_OS, --network-os NETWORK_OS\n                        The network-os plugin to load\n  --json                Return the output as a JSON\n\n\n$ ansible-connect -u bob -n vyos \"show config\" vyos101\nPassword:\n\ninterfaces {\n    ethernet eth0 {\n        address dhcp\n        hw-id 52:54:00:eb:f9:25\n        smp-affinity auto\n    }\n    loopback lo {\n    }\n}\nservice {\n    lldp {\n    }\n    ssh {\n    }\n}\nsystem {\n    config-management {\n        commit-revisions 100\n    }\n    console {\n        device ttyS0 {\n            speed 9600\n        }\n    }\n    host-name vyos101\n    login {\n        user vyos {\n            authentication {\n                encrypted-password ****************\n                plaintext-password ****************\n            }\n            level admin\n        }\n    }\n    ntp {\n        server 0.pool.ntp.org {\n        }\n        server 1.pool.ntp.org {\n        }\n        server 2.pool.ntp.org {\n        }\n    }\n    syslog {\n        global {\n            facility all {\n                level info\n            }\n            facility protocols {\n                level debug\n            }\n        }\n    }\n    time-zone UTC\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmake%2Fansible-connect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmake%2Fansible-connect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmake%2Fansible-connect/lists"}