All of the posts on orchestration on here have been about Puppet on CentOS however last week I had need to script an AWS architecture and then launch instances built with Packer into it.

After much swearing I managed to hack together a python script which used Boto to create a launch configuration and register it with an auto-scaling group, I then used a second script which re-cycled instances behind the Elastic Load Balancer which were launched with the previous launch configuration.

I decided there must be a more elegant way of doing this so I looked at Puppet using it to manage AWS, there are some modules available but there was a lot of people discussing the various ways to configure a VPC using Puppet. Then I remember that learning the basics of Ansible was on my list of things to do.

As Ansible is agent-less I needed to install it on my Mac, this is simple enough as you can use Brew  ….

First Steps with Ansible 1/3
bbrreewwuipndsattaellansible

… once install I used a CentOS 7 Vagrant box to work through a few tutorials  …

First Steps with Ansible 2/3
rvB======dd=d===dddd=====dd=PGoTcTcTsTcTcNcPduar======ee=e===eeee=====ee=LAkAhAhAkAhAhOhLesgi>>>>>>ff>f>>>ffff>>>>>ff>AT:SaSaSiSaSaTaAfsrnaaaaaaaaaYHKnKnKpKnKnInYaagdddddduududdduuuuddddduudE[:g:g:p:g:gFgu@nieeeeeelleleeelllleeeeelle[RdeeieeIeRltnffffffttftfffttttfffffttfaIe[d[d[n[d[dEdEtRgaaaaaa::a:aaa::::aaaaa::alNfc:c:cgc:c:D:CuuuuuuuuuuuuuuuuuulGaooo:oo:A:spmllllllAAl2lllSSSWlllll/l]um[m[mm[m[[Psattttttddt2tttSSSatttttsvtFlmdmdm[mdmd[dosc::::::aa::::HHHr:::::ha:Atoeoeodoeoecek-hpp=nagC]nfnfnenfnfof=iiIMCSCPttF>RBWauaiMCSCMrrRTaafaama6MnmahelreeouoadsunaheooeauS|u|u|a|u|umuaepteteerrr2noidetgcetnunnllullolccocctapw2nttrrh:hctfn=tnitctnlntstnthrhkira12a2iiienikiit>in]h]ttt]t]]aidtiinir::r2nnnsamCningi=nsep]pa|nneinngnidgggsmeoengun/>gtcdrgfngggnnhi(:etngrgUakactre~agtgaonaVf:hnbhis/pltoed/uMihatsgdpMo1oeofonseUrlnenns=DlbAfenntarr2vdcoosghrsot]ftt5etaCyeoppe7a:ttrtasevnpipassbntnot-m.gienar/ritdgdrukeaoapwlreba0rpodganerssptntudxmroytroc.arnumddu/i]sfsropbdeersoh0niaeesroeieneporvk1ti.tvtnsefsunrlrta/wxezoi)n1aidtno/sevevpcaisofoie:tmalDsri]idhntsrunV2eerabde/:cc]ashzetstMt2oedlesDeebiofshleo2kuadirkea]lbroveyrc2etdinstsnielverifuby.ytgokss=eistVsaso!ipti0rvN/MectoRon/obstiAc:teoteneapltfutTesm.tstn/eoaa/nanirwsapilcntnebzTyioinplbeeostaahinrbseeontsiwstinkliddxtw-boeisgVeb]=oo7lrdoMi/l0sr.eknmnsep-k0-osathr7i0inyeao.n0nrrv0gi0tctfeisdeoaaddrnkceu0ffeerpcais7cgat6euo8srf4aedetwa4it4omedni2n5u7t7e6s288b71d594e00234a0ad_default_1418570825018_9435

… like all first steps using a new orchestration tool I had installed & configured NTPD.

The syntax itself isn’t too different from Puppet so it was easy to get the gist of what was going on. Once I had gotten my head around the basics I started on creating a Playbook which configures a VPC and launches an Elastic Load Balancer , here is the current work in progress …

First Steps with Ansible 3/3
-----nynsrncwntnnsauaheaohaeoaemmmegmmemmt-mre:eliemnepiev::ls:a::lfr:ip:tnayecikcendrnt:ssengh"rt:etett:s=es:psp:aatncednurrnatkrratlcsttalpvetptormlnised.ncnnestcuasf=tt=ntpelttirppntadtedgoddtptnolpest0ufesd=ep.tiseirdul/rsnvk=ecvtsis.=oiatctpmctaeao"meelto0o=liul"nsess./tdntas|tertpmtog.peproldperaepgteden-saq/bnlstetpdo.=pcypoeensdf;.je2chdoes$t?="/etc/ntp.confowner=rootgroup=rootmode=0644

Once I have everything working as expected I will post an update.