{"id":22756569,"url":"https://github.com/maltehedderich/examples-ansible","last_synced_at":"2025-07-06T02:35:23.258Z","repository":{"id":260645531,"uuid":"840745504","full_name":"maltehedderich/examples-ansible","owner":"maltehedderich","description":"This repository contains a collection of examples for Ansible playbooks to help you understand Ansible.","archived":false,"fork":false,"pushed_at":"2024-09-01T14:36:30.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T10:12:46.901Z","etag":null,"topics":["ansible","ansible-playbook"],"latest_commit_sha":null,"homepage":"","language":null,"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/maltehedderich.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":"2024-08-10T14:58:47.000Z","updated_at":"2024-09-01T14:36:33.000Z","dependencies_parsed_at":"2024-11-01T15:33:14.962Z","dependency_job_id":"a992d653-5080-420f-8b11-9a704919011a","html_url":"https://github.com/maltehedderich/examples-ansible","commit_stats":null,"previous_names":["maltehedderich/examples-ansible"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maltehedderich%2Fexamples-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maltehedderich%2Fexamples-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maltehedderich%2Fexamples-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maltehedderich%2Fexamples-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maltehedderich","download_url":"https://codeload.github.com/maltehedderich/examples-ansible/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246290570,"owners_count":20753724,"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"],"created_at":"2024-12-11T07:14:20.335Z","updated_at":"2025-03-30T07:44:29.273Z","avatar_url":"https://github.com/maltehedderich.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Playbooks\n\n## What is Ansible?\n\nAnsible is an open-source automation tool that simplifies configuration management, application deployment, and task automation. It uses a declarative language to describe system configurations and can manage multiple systems simultaneously.\n\nKey features of Ansible:\n\n- **Agentless**: No need to install software on managed nodes\n- **YAML-based**: Uses simple, human-readable YAML files for playbooks\n- **Idempotent**: Can safely run playbooks multiple times without changing the result\n- **Extensible**: Supports modules and plugins for extended functionality\n\n## Prerequisites\n\n- Ansible installed on your local machine\n- SSH access to the targets (e.g., VPS, servers)\n- Basic understanding of YAML and Linux commands\n\n## Installation\n\nTo install Ansible on your local machine:\n\n### Ubuntu/Debian:\n\n```bash\nsudo apt update\nsudo apt install ansible\n```\n\n### macOS (using Homebrew):\n\n```bash\nbrew install ansible\n```\n\n### Windows (using WSL):\n\nInstall Windows Subsystem for Linux (WSL) and then install Ansible within the Linux environment.\nVerify the installation:\n\n```bash\nansible --version\n```\n\n## Running the Playbooks\n\n1. Create an inventory file (e.g., inventory.ini) with your VPS details:\n\n```text\n[vps]\nyour_vps_name ansible_host=your_vps_ip ansible_user=root\n```\n\n2. Ensure SSH key-based authentication is set up:\n\n```bash\nssh-copy-id -i ~/.ssh/your_key.pub root@your_vps_ip\n```\n\n3. Run the playbook:\n\n```bash\nansible-playbook -i inventory.ini \u003cPATH_TO_PLAYBOOK\u003e\n```\n\n## Customization\n\n- Modify the vars section in the playbook to customize settings like SSH port and username.\n- Add or remove tasks as needed for your specific requirements.\n\n## Best Practices\n\n- Always test playbooks in a non-production environment first.\n- Use version control (e.g., Git) to track changes to your playbooks.\n- Regularly update and review your security measures.\n- Use Ansible Vault for sensitive information.\n\n## Troubleshooting\n\n- If you encounter SSH issues, ensure your SSH key is correctly set up and the VPS is reachable.\n- Check Ansible logs for detailed error messages.\n- Verify that the playbook YAML syntax is correct.\n\n## Additional Resources\n\n- [Ansible Documentation](https://docs.ansible.com/)\n- [Ansible Best Practices](https://docs.ansible.com/ansible/latest/tips_tricks/ansible_tips_tricks.html)\n- [Ansible Galaxy](https://galaxy.ansible.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaltehedderich%2Fexamples-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaltehedderich%2Fexamples-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaltehedderich%2Fexamples-ansible/lists"}