While there are different strategies to integrate Ansible to CloudFormation, in our situation there is an obvious path to take. We are going to take advantage of the UserData field, and initialize Ansible through the ansible-pull command.
We are now going to start the Troposphere script that we created earlier in this chapter. We will duplicate this and call the new script as follows:
ansiblebase-cf-template.py.
Go to your template repository and duplicate the previous template as follows:
$ cd EffectiveDevOpsTemplates $ cp helloworld-cf-template.py ansiblebase-cf-template.py
Next, open the ansiblebase-cf-template.py script with your editor. To keep the script readable, we will first define several ...