{"id":13587798,"url":"https://github.com/turkenh/ansible-interactive-tutorial","last_synced_at":"2025-05-16T01:04:33.256Z","repository":{"id":44854787,"uuid":"103787360","full_name":"turkenh/ansible-interactive-tutorial","owner":"turkenh","description":"Interactive Ansible tutorials with dead simple setup via Docker","archived":false,"fork":false,"pushed_at":"2022-01-01T18:12:01.000Z","size":92,"stargazers_count":1493,"open_issues_count":9,"forks_count":209,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-04-08T11:14:22.942Z","etag":null,"topics":["ansible","ansible-galaxy","ansible-playbook","devops","docker","interactive","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/turkenh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-tutorials.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-16T22:19:16.000Z","updated_at":"2025-03-05T21:59:16.000Z","dependencies_parsed_at":"2022-09-20T17:51:42.335Z","dependency_job_id":null,"html_url":"https://github.com/turkenh/ansible-interactive-tutorial","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/turkenh%2Fansible-interactive-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turkenh%2Fansible-interactive-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turkenh%2Fansible-interactive-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turkenh%2Fansible-interactive-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/turkenh","download_url":"https://codeload.github.com/turkenh/ansible-interactive-tutorial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448579,"owners_count":22072764,"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-galaxy","ansible-playbook","devops","docker","interactive","tutorial"],"created_at":"2024-08-01T15:06:22.071Z","updated_at":"2025-05-16T01:04:33.239Z","avatar_url":"https://github.com/turkenh.png","language":"Shell","readme":"# ansible-interactive-tutorial\n\n[![Build Status](https://travis-ci.org/turkenh/ansible-interactive-tutorial.svg?branch=master)](https://travis-ci.org/turkenh/ansible-interactive-tutorial)\n\nInteractive tutorials for Ansible\n\n## Prerequisite\n\nOnly prerequisite is **docker**\n\nRequires docker version 1.9+ and tested with 1.12+\n\nIf you don't have docker installed, you can also run on http://play-with-docker.com (just click \"+ ADD NEW INSTANCE\" button and clone this repo there)\n\n## How to Run\n\n```bash\n./tutorial.sh\n```\n\n[![demo](https://asciinema.org/a/CPUhOGGlcLiXVlZKIuiuk5Q7f.png)](https://asciinema.org/a/CPUhOGGlcLiXVlZKIuiuk5Q7f?autoplay=1)\n\n## Clean up\n\n```bash\n./tutorial.sh --remove\n```\n\n## More Details\n\n### Tutorials\n\nAlmost all of the tutorials are adapted from the great [leucos/ansible-tuto](https://github.com/leucos/ansible-tuto) repository:\n\n```\n1. Getting Started\n2. Basic inventory\n3. First modules and facts\n4. Groups and variables\n5. Playbooks\n6. Playbooks, pushing files on nodes\n7. Playbooks and failures\n8. Playbook conditionals\n9. Git module\n10. Extending to several hosts\n11. Templates\n12. Variables again\n13. Migrating to roles!\n14. Using roles from Ansible Galaxy - Install a Jenkins server\n15. Free play\n```\n\nYou can run each lesson individually but it is **highly encouraged to follow the order** as most of them are built on top of the previous one!\n\n\n### Containers\n\n`tutorial.sh` starts 4 docker containers behind the scenes. 1 for running the tutorial itself and 3 as ansible nodes which behave exactly same as (virtual or physical) machines throughout the tutorial. \n\n**ansible.tutorial** is an alpine based tutorial container in which ansible and [nutsh](https://github.com/turkenh/nutsh) (a framework for creating interactive command line tutorials) are available.\n\n**host0.example.org**, **host1.example.org** and **host2.example.org** are the Ubuntu 16.04 based containers that act as ansible nodes. These nodes were already provisioned with the ssh key of **ansible.tutorial** container. So that you don't have to deal with setting up keys.\n\n### Port Mapping\n\nThere are some checkpoints in the tutorials where you can check and verify your deployments. For this purpose some ports of the containers are exposed as host ports as follows:\n\nContainer|Container Port|Host Port   \n:---|:---:|:---:\nhost0.example.org|80|`$HOSTPORT_BASE`  \nhost1.example.org|80|`$HOSTPORT_BASE+1`\nhost2.example.org|80|`$HOSTPORT_BASE+2`\nhost0.example.org|8080|`$HOSTPORT_BASE+3`\nhost1.example.org|30000|`$HOSTPORT_BASE+4`\nhost2.example.org|443|`$HOSTPORT_BASE+5`\n\n`HOSTPORT_BASE` is set to `42726` by default and can be changed while starting the tutorial (in case any of the consecutive 6 ports is not available) as follows:\n\n```bash\n./tutorial.sh --remove # Make sure you shut down the previous ones\nHOSTPORT_BASE=\u003csome_other_value\u003e ./tutorial.sh\n```\n\n### Workspace Directory\n`ansible-interactive-tutorial/workspace` directory on your local machine is mounted as `/root/workspace` inside the **ansible.tutorial** container. So, you can use your favorite editor on your local machine to edit files. Editing files is not necessary to follow the lessons though.\n\n\n\n\n","funding_links":[],"categories":["Shell","devops","tutorial"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturkenh%2Fansible-interactive-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturkenh%2Fansible-interactive-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturkenh%2Fansible-interactive-tutorial/lists"}