Ryan Brown

Author Archives: Ryan Brown

Hybrid Operations with Ansible

RedHat-Summt-2018-Blog

Hybrid Operations with Ansible

One of the most common questions I hear while talking about Ansible's support for cloud providers is whether it will work in hybrid environments. You may not be able to use the ec2 module to create an instance in your datacenter, but Ansible has modules for RHV, OpenStack, and VMWare to talk to virtualization tools in your datacenter. I love working in AWS, Azure, and Google Cloud but most environments I've worked in have had on-prem systems as well.

That's what I've been invited to Red Hat Summit to talk about -- best practices for automating all the infrastructure at your disposal, not just the cloud services. My demos will feature a couple new Ansible Core/Engine 2.5 features, as well as preview new 2.6-only features.

My favorite feature to show off is part of the new ec2_instance module. In the demo we'll have a look at how Tower provisioning callbacks are now built in to the ec2_instance module, making provisioning brand new instances as easy as:

- ec2_instance:
  image:
    id: "{{ latest_centos.image_id }}"
  key_name: my-secret-key
  instance_type: t2.large
  name: call-me-maybe
  security_groups:
    - demo-web-sg
  # COOL MAGIC HERE
  tower_callback:
    host_config_key: "{{ your_secret_here }}"
    job_template_id:  Continue reading