Thanks, I think thats a good approach.
Quick not for anyone willing to do the same: user_data already runs as root so
you must remove sudo from the command.
user_data: |
#!/bin/sh
yum install httpd -y
Thanks Arbab!
On Jan 5, 2016, at 1:24 AM, Arbab Nazar
<[email protected]<mailto:[email protected]>> wrote:
You can add the user_data during the ec2 creation like this:
user_data: |
#!/bin/sh
sudo yum install -y httpd
For Complete Reference, please check this
link<https://github.com/arbabnazar/ansible-aws-vpc-ha-wordpress/blob/master/aws/tasks/webserver.yml#L47>
On Tuesday, January 5, 2016 at 9:27:10 AM UTC+5, Gustavo Aguiar wrote:
Hi All,
I’m trying to install the httpd package in recently created EC2 instances in my
playbook.
I have multiple playbooks in different roles that are being invoked at once.
When I get to add my recently created EC2 instances to the also recently
created ELB, my registration fails once my instances doesn’t have httpd running
yet and the health_check fails.
What would be the best approach in this case ?
- Installing httpd packages after the EC2 creation and then adding instances to
the ELB ?
Thanks in advance,
—Gustavo
________________________________
This email has been scanned for email related threats and delivered safely by
Mimecast.
For more information please visit
http://www.mimecast.com<http://www.mimecast.com/>
________________________________
---------------------------------------------------------------------------------------
This email has been scanned for email related threats and delivered safely by
Mimecast.
For more information please visit http://www.mimecast.com
---------------------------------------------------------------------------------------
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/BFA84110-380F-4535-8E32-E8D40823C7BF%40itmethods.com.
For more options, visit https://groups.google.com/d/optout.