{"id":16281229,"url":"https://github.com/ismet55555/ansible-configure","last_synced_at":"2026-04-10T21:04:23.015Z","repository":{"id":105025312,"uuid":"291539047","full_name":"ismet55555/Ansible-Configure","owner":"ismet55555","description":"Ansible playbooks to automatically configure for various systems","archived":false,"fork":false,"pushed_at":"2023-02-13T03:42:32.000Z","size":94,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T14:17:17.946Z","etag":null,"topics":["ansible","ansible-playbook","automation","configuration","configuration-management","raspberry-pi","ssh"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/ismet55555.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":"2020-08-30T19:36:35.000Z","updated_at":"2023-02-13T11:40:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"c93df228-95fe-4190-82be-96c1b240ed9a","html_url":"https://github.com/ismet55555/Ansible-Configure","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":0.3793103448275862,"last_synced_commit":"b67e3c277535aa632a52284ef30ffed7711b58fd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismet55555%2FAnsible-Configure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismet55555%2FAnsible-Configure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismet55555%2FAnsible-Configure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismet55555%2FAnsible-Configure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ismet55555","download_url":"https://codeload.github.com/ismet55555/Ansible-Configure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247895757,"owners_count":21014379,"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":["ansible","ansible-playbook","automation","configuration","configuration-management","raspberry-pi","ssh"],"created_at":"2024-10-10T19:05:58.885Z","updated_at":"2026-04-10T21:04:17.980Z","avatar_url":"https://github.com/ismet55555.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Configure\nAnsible playbooks and utility scripts to setup different systems.\n\n\n# Running an Ansible Playbook\nYou will find the ansible playbooks in `.yml` files. The following command will run an ansible playbook. This executed using the terminal.\n\n`ansible-playbook \u003cPATH/NAME\u003e.yml`\n\nExamples:\n- `ansible-playbook Raspberry_Pi_OS/rpi-all.yml`\n- `ansible-playbook Raspberry_Pi_OS/rpi-all.yml --tags basics`\n- `ansible-playbook Raspberry_Pi_OS/docker.yml --limit cluster-pi-group`\n- `ansible-playbook Raspberry_Pi_OS/rpi-config.yml --limit cluster-pi-1`\n\nSome Useful Options:\n- `-K` - Ask for privellage escalation (aka sudo)\n- `--tags` - Only target the playbook tasks with specific tags\n- `--limit` - Only target specified hosts or host groups\n\nFor more `ansible-playbook` options, checkout the amazing documentation:\nhttps://docs.ansible.com/ansible/2.7/cli/ansible-playbook.html\n\n\n\n\n------\n\n\n\n# Generate Key Pair and Distribute to Remote Devices\n\nTo not have to enter a password every time you SSH into a device, you can create a key pair and send the public key to the remote device you are SSH-ing into.\n\nIn fact, you probably need to do this for ansible to smoothly operate. \n\n\n## Create a Private-Public Key-Pair (if needed)\n1. Install OpenSSH locally (if needed)\n   - `sudo apt-get install openssh-server`\n2. Generate the SSH private-public key-pair\n    - `ssh-keygen`\n    - Enter some name for the key-pair\n    - Don't need the password unless you are really worried about the security of this system\n    - The key-pair will be saved locally in the `~/.ssh` directory\n\n\n\n## Distribute the Public Key the Cool Kids Automatic and Scalable Way\nThis way is much better if you are working with many remote hosts/devices.\n\n1. Go to the `Utilities/Distribute_SSH_Keys` directory\n2. In `remote_host_list.txt`, add the remote host/device IP addresses to the list\n3. Specify the following in `distribute_ssh_key.sh`\n  ```bash\n      SSH_PUBLIC_KEY_LOCATION=\"/home/\u003cUSERNAME ON DEVICE\u003e/.ssh/public-key.pub\"\n      REMOTE_HOST_USERNAME=\"\u003cYOUR REMOTE HOSTS USERNAME HERE\"\n      REMOTE_HOST_PASSWORD=\"\u003cYOUR REMOTE HOSTS PASSWORD HERE\"\n  ```\n4. Give the `distribute_ssh_key.sh` script executable permissions\n   - This is only done once\n   - `sudo chmod +x distribute_ssh_key.sh`\n\n5. Execute the script\n   - `./distribute_ssh_key.sh`\n\n\n\n\n## Distribute the Public Key the Reliable Manual Way\n\nThis way is probably good enough for one or two remote hosts.\n\n1. Copy the SSH public key to the remote host/device\n   - `ssh-copy-id -i \u003cPATH/NAME OF PUBLIC KEY\u003e \u003cHOST IP or DNS NAME\u003e`\n   - Example: \n     - `ssh-copy-id -i /home/my-username/.ssh/my-cool-key.pub 192.168.0.50`\n2. Check the SSH Connection (Should not have to enter password)\n   - `ssh -i \u003cPATH/NAME OF PRIVATE KEY\u003e \u003cREMOTE USERNAME\u003e@\u003cHOST IP or DNS Name\u003e`\n   - Example:\n     - `ssh -i /home/my-username/.ssh/my-cool-key pi@192.168.0.50`\n\n**SEMI-PRO TIP:** If you are using the keyname `id_rsa` you will not need the `-i` flag with the path to the key\n\n\n# Licence\nThis project is licensed under the Apache 2.0 License - Please see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismet55555%2Fansible-configure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismet55555%2Fansible-configure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismet55555%2Fansible-configure/lists"}