github.com/ansible/workshops contains an Ansible Playbook
provision_lab.yml, which is an automated lab setup for Ansible training on AWS (Amazon Web Services). Set the
workshop_type variable below to provision the corresponding workshop.
|Workshop||Workshop Type Var|
|Ansible for Red Hat Enterprise Linux Workshop||
|Ansible for Red Hat Enterprise Linux Workshop - 90 minutes||
|Ansible Network Automation Workshop||
|Ansible F5 Workshop||
|Ansible Security Automation||
|Ansible Windows Automation||
|Ansible Demo Mode||
|Smart Management Workshop||
--- # region where the nodes will live ec2_region: us-east-1 # name prefix for all the VMs ec2_name_prefix: TESTWORKSHOP # creates student_total of workbenches for the workshop student_total: 2 # Set the right workshop type, like network, rhel or f5 (see above) workshop_type: rhel #####OPTIONAL VARIABLES # turn DNS on for control nodes, and set to type in valid_dns_type dns_type: aws # password for Ansible control node admin_password: your_password123 # Sets the Route53 DNS zone to use for Amazon Web Services workshop_dns_zone: rhdemo.io # automatically installs Tower to control node towerinstall: true # IBM Community Grid - defaults to true if you don't tell the provisioner ibm_community_grid: false
If you want to license it you must copy a license called tower_license.json into this directory. If you do not have a license already please request one using the Workshop License Link.
For more extra_vars examples, look at the following:
rhel_90workshop, meant to be taught in 90 minutes
demomode, aggregate of all workshop topologies
ansible-playbook provision_lab.yml -e @extra_vars.yml
IBM’s World Community Grid is integrated into the workshops. World Community Grid enables anyone with a Linux, Windows or Mac computer (or an Android smartphone for some projects) to donate their unused computing power to advance scientific research on topics related to health and sustainability.
By default the key, value pair is set:
ibm_community_grid: true. This installs the boinc-client to all Red Hat Enterprise Linux instances (except the Ansible control node). This can be disabled by setting
ibm_community_grid: false. By default in the Ansible Automation workshops all research progress (points and CPU time) is added to a joint Ansible account for Red Hat. If you prefer to use your own account, or another project change the following variables:
boinc_auth: "1114316_4080087955dc198a6109a25a56817809" boinc_url: "www.worldcommunitygrid.org"
Please read this blog for more information: https://www.ansible.com/blog/ansible-and-ibm-community-grid
Exercises and instructor slides are hosted at http://ansible.github.io/workshops
Workbench information is stored in two places after you provision:
By default there will be a website
/tmpon student1’s control_node as part of the control_nodes role.
The provisioner currently supports creating DNS records per control node with valid SSL certs using Lets Encrypt. Right now DNS is only supported via AWS Route 53, however we are building it in a way that this can be more pluggable and take advantage of other public clouds.
This means that each student workbench will get an individual DNS entry. For example a DNS name will look like this:
aws. This can also be set to
summary_informationat the end of the
The Smart Management Lab relies on a prebuilt AMI for Red Hat Satellite Server. An example for building this AMI can be found here.
The Smart Management Lab also requires AWS DNS to be enabled and IBM community Grid to be disabled. See sample vars for required configuration.
teardown_lab.yml playbook deletes all the training instances as well as local inventory files.
To destroy all the EC2 instances after training is complete:
ansible-playbook teardown_lab.yml -e @extra_vars.yml
ansible-playbook teardown_lab.yml -e @extra_vars.yml -e debug_teardown=true
There is a variable you can pass in within your extra_vars named
demo. When this keyword is defined it will install the specified demo from the Github repository https://github.com/ansible/product-demos.h
For example you can put:
Which will install all demos onto the Ansible Tower instance. Not all demos will work on any
workshop_type. Please refer to the Demo repository list.
For frequently asked questions see the FAQ
provision_lab.yml playbook creates a work bench for each student, configures them for password authentication, and creates an inventory file for each user with their IPs and credentials. An instructor inventory file is also created in the current directory which will let the instructor access the nodes of any student. This file will be called
What does the AWS provisioner take care of automatically?
Please file issues on Github. Please fill out all required information. Your issue will be closed if you skip required information in the Github issues template.