Ansible for Automation!

Buy Access

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?


Your Guides

Victor Bocharsky Ryan Weaver

Questions? Conversation?

  • 2017-11-02 Victor Bocharsky

    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!

  • 2017-11-02 sokphea chea (ជា សុខភា)

    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.

  • 2017-07-13 Victor Bocharsky

    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!

  • 2017-07-12 Patrick van Beck

    hey weaverryan 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.

  • 2017-04-11 weaverryan

    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!

  • 2017-04-08 Micheal

    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.

  • 2017-04-05 sokphea chea (ជា សុខភា)

    can't wait for more.

  • 2016-09-22 Felipe Martins

    WOW I'm looking forward for this!