{"id":26525068,"url":"https://github.com/michaelbolanos/ansible-install","last_synced_at":"2026-05-10T09:55:23.626Z","repository":{"id":279077245,"uuid":"934623232","full_name":"michaelbolanos/ansible-install","owner":"michaelbolanos","description":"This repo provides a simple way to set up OpenSSH and configure public keys on multiple Ubuntu machines to prepare them for Ansible automation","archived":false,"fork":false,"pushed_at":"2025-03-19T15:44:59.000Z","size":14667,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T16:38:38.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/michaelbolanos.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":"2025-02-18T06:18:18.000Z","updated_at":"2025-03-19T15:45:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec4c01b5-61f8-446a-9f3d-0d04c86fc94b","html_url":"https://github.com/michaelbolanos/ansible-install","commit_stats":null,"previous_names":["michaelbolanos/ansible-install"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelbolanos%2Fansible-install","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelbolanos%2Fansible-install/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelbolanos%2Fansible-install/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelbolanos%2Fansible-install/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelbolanos","download_url":"https://codeload.github.com/michaelbolanos/ansible-install/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244816342,"owners_count":20515077,"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":"2025-03-21T14:50:46.129Z","updated_at":"2026-05-10T09:55:18.582Z","avatar_url":"https://github.com/michaelbolanos.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Install\n\n\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/2/24/Ansible_logo.svg\" alt=\"Ansible Logo\" width=\"72px\"\u003e\n\n\n\nThis repo provides a simple way to set up OpenSSH and configure public keys on multiple Ubuntu machines to prepare them for Ansible automation.\n\n## Features\n✅ Installs OpenSSH on target Ubuntu machines.  \n✅ Adds your public SSH keys for seamless Ansible access.  \n✅ Includes a sample `hosts.txt` file for Ansible inventory.  \n\n---\n\n## Step 1: Clone the Repository\n\nTo get started, clone this repository to your local machine:\n\n```bash\ngit clone https://github.com/michaelbolanos/ansible-install.git\ncd ansible-install/scripts\n```\n\n---\n\n## Step 2: Configure Your Hosts File\n\nEdit the `hosts.txt` file to include the IP addresses or hostnames of the machines you want to manage with Ansible:\n\n```plaintext\n192.168.1.100\n192.168.1.101\n192.168.1.102\n```\n\n---\n\n## Step 3: Install OpenSSH via Curl or Wget\n\nRun the following command on each Ubuntu machine to install OpenSSH.\n\n### Using `curl`\n```bash\ncurl -sSL https://raw.githubusercontent.com/michaelbolanos/ansible-install/main/scripts/install_ssh.sh | bash\n```\n\n### Using `wget`\n```bash\nwget -qO- https://raw.githubusercontent.com/michaelbolanos/ansible-install/main/scripts/install_ssh.sh | bash\n```\n\n---\n\n## Step 4: Copy SSH Keys to Remote Machines\n\nTo enable passwordless SSH authentication, use the provided `ssh-keys.sh` script. Run this from your control machine:\n\n```bash\nbash ssh-keys.sh\n```\n\nThis script will:\n\n```bash\n# Copy SSH public key to each host in hosts.txt\nwhile read -r host; do\n    ssh-copy-id -i ~/.ssh/id_rsa.pub \"ubuntu@$host\"\ndone \u003c hosts.txt\n```\n\n- Copies your SSH public key to each host listed in `hosts.txt`\n- Ensures secure key-based authentication\n\n---\n\n## Step 5: Verify SSH Access\n\nOnce keys are copied, test SSH access to the remote machines:\n\n```bash\nssh ubuntu@192.168.1.100\n```\n\nIf login works without a password prompt, you're ready to use Ansible! 🎉\n\n---\n\n## Next Steps: Set Up Ansible\n\nNow that SSH is configured, install Ansible and begin automating your infrastructure.\n\n```bash\nsudo apt update \u0026\u0026 sudo apt install -y ansible\n```\n\nYou can now create an Ansible inventory file and start managing your machines\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelbolanos%2Fansible-install","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelbolanos%2Fansible-install","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelbolanos%2Fansible-install/lists"}