Arbab Nazar
2015-07-27 07:26:01 UTC
I want to install the nginx by passing it as the user data to the ec2
instance at the launch time. I am passing it like this
- name: WebServer | Create the WebServer Instance(s)
local_action:
module: ec2
region: "{{ vpc_region }}"
group: "{{ ec2_security_groups[1].sg_name }}"
keypair: "{{ key_name }}"
instance_type: "{{ web_instance_type }}"
*user_data: "sudo apt-get install nginx -y"*
image: "{{ imgae_id.ami }}"
vpc_subnet_id: "{{ public_subnet }}"
#private_ip: "{{ nat_private_ip }}"
assign_public_ip: True
wait: True
wait_timeout: 600
But the above method didn't work for me although it has created the EC2
instance successfully but didn't install the nginx.
Can you please point me in the right direction. Thanks
instance at the launch time. I am passing it like this
- name: WebServer | Create the WebServer Instance(s)
local_action:
module: ec2
region: "{{ vpc_region }}"
group: "{{ ec2_security_groups[1].sg_name }}"
keypair: "{{ key_name }}"
instance_type: "{{ web_instance_type }}"
*user_data: "sudo apt-get install nginx -y"*
image: "{{ imgae_id.ami }}"
vpc_subnet_id: "{{ public_subnet }}"
#private_ip: "{{ nat_private_ip }}"
assign_public_ip: True
wait: True
wait_timeout: 600
But the above method didn't work for me although it has created the EC2
instance successfully but didn't install the nginx.
Can you please point me in the right direction. Thanks
--
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 ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4223055a-f9f7-4204-ad51-c6cae53cb9a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4223055a-f9f7-4204-ad51-c6cae53cb9a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.