Ansible for Automation!
Up your server provisioning game with Ansible. Learn about roles, prompt input, and deploying to EC2.
- 1828 students
- EN Captions
- EN Script
- Certificate of Completion
Your Guides
About this course
In this screencast, we automate provision of Linux server with a wonderful automation tool named Ansible and explore the most fundamental parts of this process:
- Configuring an entire Vagrant host for a web (Symfony) app
- Provision hosts with Ansible
- Inventory files
- All about Ansible modules
- Playbooks, plays, tasks
- Variables and facts
- Handlers
- Conditionals and tags
- Jinja2 templates (functions, filters, loops, variables, etc.)
- Roles
- Prompt input
- Debugging
- Deploying to EC2
- Ansible Vault, for secret stuff
Are you ready to start adding some automation to your daily workflow?
Next courses in the Dev Tools: Tools, tools, tools! section of the Dev Tools Track!
8 Comments
I'm really looking forward to seeing this completed. Since Ansible requires, for now at least, Python 2.7 still ( :/ ), could you add in something about virtualenv? Ubuntu and other distros are starting to move to Python 3 now and that might cause problems for people.
Hey Micheal!
Ah, great question / comment about Python 2 and 3. I'm going to check into this - there is already a little bit of this that I was dealing with earlier today :).
Cheers!
Hello, is there any way we can link our local project folder to the host and get change instantly when we edit it? Following the the tutorial we only git clone our project in the host not link it from our local. Thank you.
Hey Sokphea,
Yes, there is! Actually, with Ansible you can do whatever you want - it's very powerful. If we're talking about virtualization - you can do it on your virtualization tool's level, i.e. share your local folder with VirtualBox and when you will make a change locally - it will instantly apply inside VirtualBox, and the reverse, if inside VirtualBox you warm up cache - you'll see those cache files locally. See Vagrant Synced folders: https://www.vagrantup.com/d... , for example, look at https://www.vagrantup.com/d... or probably better NFS: https://www.vagrantup.com/d... - it should work faster. But anyway, sharing files in real time will be much slower, so be ready that your website could load slower up to 10x times, depends on synced folder strategy.
Cheers!
hey there and Victor
I've watched the tutorial and it is great! Thanks a lot! I have a question left, after having seen the videos on Ansible. Currently, I have the following setup within a project:
Dev -> Test -> Prod
In Dev environment, we develop the code, run some tests and push it afterwards to the vcs (git). Then, the CI-process starts and integrates the changes on the test environment (another virtual maschine, using Jenkins and Apache Ant) and runs the tests again (and some more). When the code and tests are allright, we deploy it to a prod environment by calling some bash script from within the apache ant build xml.
What would be the workflow now using Ansible and Ansistrano? Would I still use Apache Ant for the Continuous Integration task on Test Environment, and when CI Process shows "green", I'd call the Ansible/Ansistrano playbook instead of the bash script? Or will Ansible completely replace Apache Ant (CI-Process), so I'd use Ansible (+ Ansistrano) for the Integration AND deployment process?
Best Regards,
Patrick.
Hey Patrick,
Good question! Actually, we're planning to show this workflow in Ansistrano tutorial: when the tests are green on CI - automatically deploy the code to production with Ansistrano. So I *think* yes, you could replace Apache Ant part which take care of deployment with Ansible playbook with installed Ansistrano role. So the new possible workflow for you is: ... push code to CI, CI tests the application and if tests are passed - run Ansible playbook with installed Ansistrano role to deploy this code to production.
Cheers!
WOW I'm looking forward for this!