{"id":14965297,"url":"https://github.com/hatamiarash7/salt-server-parser","last_synced_at":"2025-10-25T11:31:23.867Z","repository":{"id":60182523,"uuid":"541533103","full_name":"hatamiarash7/Salt-Server-Parser","owner":"hatamiarash7","description":"Generate SSH config from Salt server lists","archived":false,"fork":false,"pushed_at":"2025-01-28T15:08:43.000Z","size":103,"stargazers_count":6,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-28T16:23:16.111Z","etag":null,"topics":["salt","saltstack","ssh","ssh-config","ssh-generator"],"latest_commit_sha":null,"homepage":"","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/hatamiarash7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"patreon":"hatamiarash7","ko_fi":"hatamiarash7","custom":"https://payping.ir/@hatamiarash7"}},"created_at":"2022-09-26T10:41:50.000Z","updated_at":"2025-01-04T15:47:45.000Z","dependencies_parsed_at":"2023-01-22T22:46:01.779Z","dependency_job_id":"77ae3ee3-e222-4193-a9ae-d485fc5a2b13","html_url":"https://github.com/hatamiarash7/Salt-Server-Parser","commit_stats":{"total_commits":73,"total_committers":3,"mean_commits":"24.333333333333332","dds":0.4794520547945206,"last_synced_commit":"b75296e0a666d275efda1bcec360b52209212267"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2FSalt-Server-Parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2FSalt-Server-Parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2FSalt-Server-Parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2FSalt-Server-Parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hatamiarash7","download_url":"https://codeload.github.com/hatamiarash7/Salt-Server-Parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238128552,"owners_count":19421053,"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":["salt","saltstack","ssh","ssh-config","ssh-generator"],"created_at":"2024-09-24T13:34:32.770Z","updated_at":"2025-10-25T11:31:18.582Z","avatar_url":"https://github.com/hatamiarash7.png","language":"Python","funding_links":["https://patreon.com/hatamiarash7","https://ko-fi.com/hatamiarash7","https://payping.ir/@hatamiarash7"],"categories":[],"sub_categories":[],"readme":"# Salt Server Parser\n\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) [![GitHub release](https://img.shields.io/github/release/hatamiarash7/Salt-Server-Parser.svg)](https://GitHub.com/hatamiarash7/Salt-Server-Parser/releases/) [![Pylint](https://github.com/hatamiarash7/Salt-Server-Parser/actions/workflows/pylint.yml/badge.svg?branch=main)](https://github.com/hatamiarash7/Salt-Server-Parser/actions/workflows/pylint.yml) [![CodeQL](https://github.com/hatamiarash7/Salt-Server-Parser/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/hatamiarash7/Salt-Server-Parser/actions/workflows/codeql-analysis.yml)\n\nGenerate SSH config from Salt server lists\n\n## Requirements\n\n- Python 3.9+\n\n## How to use\n\nIt's your `servers.sls` file:\n\n```salt\nservers:\n    lab-1001:\n        main_ip: 1.2.3.4\n        ...\n        ...\n    lab-1002:\n        main_ip: 4.5.6.7\n        ...\n        ...\n    ...\n    ...\n\n```\n\n\u003e **Note**: Add/remove extra info from `main.py` file. For example `IdentityFile`, `IdentityAgent`, etc\n\nRun:\n\n```bash\npython main.py \u003cservers.sls\u003e \u003coutput\u003e \u003cssh port\u003e \u003cssh user\u003e \u003cmode\u003e\n```\n\n## Example\n\n```bash\npython main.py /Salt/pillar/dev/servers.sls out.txt 22 arash Staging\n```\n\n## Output\n\n```text\n#------- Staging Servers ------#\n\nHost lab-1001\n    HostName 1.2.3.4\n    Port 22\n    User user\n    IdentitiesOnly yes\n    IdentityAgent ~/.gnupg/S.gpg-agent.ssh\n    IdentityFile ~/.ssh/id_rsa_yubikey.pub\n\nHost lab-1002\n    HostName 4.5.6.7\n    Port 22\n    User user\n    IdentitiesOnly yes\n    IdentityAgent ~/.gnupg/S.gpg-agent.ssh\n    IdentityFile ~/.ssh/id_rsa_yubikey.pub\n```\n\nAlso you will have two another files:\n\n- A `ip-list.json` file containing all IPs will be generated for further use.\n- A `server-list.json` file containing all servers with their IP based on `role`, `zone`, `provider` and `code`. There is an `other` key for unknown servers. You can Change `__create_list()` function to fit your needs.\n- A `server-list.toml` file to use with [WireGuard-Config-Generator](https://github.com/hatamiarash7/WireGuard-Config-Generator)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatamiarash7%2Fsalt-server-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhatamiarash7%2Fsalt-server-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatamiarash7%2Fsalt-server-parser/lists"}