[ansible-project] new AWS EC2 instance created using ansible does not use SSD
Hi , I am trying to create EC2 instances using ansible module ec2 and the root volume gets created as "standard". I would like that to be "gp2" Below is the play that I am using - name: Launch the new EC2 Instance ec2: group: '{{ security_group }}' instance_type: '{{ instance_type}}' image: '{{ image }}' wait: true region: '{{ region }}' vpc_subnet_id: '{{ vpc_subnet_id }}' keypair: '{{ keypair }}' count: 20 volumes: - device_name: /dev/sda1 volume_type: gp2 volume_size: 10 register: ec2 I can create gp2 volumes using ec2_vol and attach to EC2, however I would like my root volume to be gp2. I can create EC2 root volume using AWS console from the same AMI. Is it possible to use gp2 for root volumes ? Thanks, Abey -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d4f92299-c3a6-4102-b9b5-45f58146d83b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] new AWS EC2 instance created using ansible does not use SSD
Hi all, Thanks for reading my question. I have successfully created gp2 root volume by changing "volume_type: gp2" to "device_type: gp2" . (Not sure why it works. manual says that device_type is deprecated) The below yaml works - name: Launch the new EC2 Instance ec2: group: '{{ security_group }}' instance_type: '{{ instance_type}}' image: '{{ image }}' wait: true region: '{{ region }}' vpc_subnet_id: '{{ vpc_subnet_id }}' keypair: '{{ keypair }}' count: '{{count}}' volumes: - device_name: /dev/sda1 device_type: gp2 volume_size: 8 register: ec2 Regards, Abey On Wed, Oct 28, 2015 at 4:04 PM, Stephen Granger wrote: > Would this depend on the AMI being used having a root ssd volume? > > I'm unsure of this and would be happily corrected. > > On 27 October 2015 at 09:10, Abey Thomas wrote: > >> Hi , >> >> I am trying to create EC2 instances using ansible module ec2 and the root >> volume gets created as "standard". I would like that to be "gp2" >> >> Below is the play that I am using >> >> - name: Launch the new EC2 Instance >> ec2: >> group: '{{ security_group }}' >> instance_type: '{{ instance_type}}' >> image: '{{ image }}' >> wait: true >> region: '{{ region }}' >> vpc_subnet_id: '{{ vpc_subnet_id }}' >> keypair: '{{ keypair }}' >> count: 20 >> volumes: >> - device_name: /dev/sda1 >> volume_type: gp2 >> volume_size: 10 >> register: ec2 >> >> >> I can create gp2 volumes using ec2_vol and attach to EC2, however I would >> like my root volume to be gp2. I can create EC2 root volume using AWS >> console from the same AMI. >> >> Is it possible to use gp2 for root volumes ? >> >> Thanks, >> Abey >> >> -- >> 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+unsubscr...@googlegroups.com. >> To post to this group, send email to ansible-project@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/d4f92299-c3a6-4102-b9b5-45f58146d83b%40googlegroups.com >> <https://groups.google.com/d/msgid/ansible-project/d4f92299-c3a6-4102-b9b5-45f58146d83b%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Steve > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Ansible Project" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/ansible-project/e0QVgvbuuWs/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > ansible-project+unsubscr...@googlegroups.com. > To post to this group, send email to ansible-project@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CA%2BemtquaesyFensFAhO-AR_sLXKXSwfbzTX%3Dra2iKC%3Dq93Cy3w%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CA%2BemtquaesyFensFAhO-AR_sLXKXSwfbzTX%3Dra2iKC%3Dq93Cy3w%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ4mmRAcWq-4ixV18hrAJGusJafVBX6qZoBNUYietfOES2VT%3Dw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] blank [ERROR]: when running ansible or ansible-playbook on ansible version 2.5.1
Hi, I am using ansible version 2.5.1 on Centos 7. Whenever I try to use ansible command line or ansible-playbook with ec2.py on AWS I get a " [ERROR]:" after Using /etc/ansible/ansible.cfg as config file. The playbook runs fine after showing one blank error word. I tried using but the blank error stays same. When I execute ec2.py alone there are no errors. I tried passing JSON output only instead of ec2.py and ansible command works as expected and executes command remoteley on multipe remote servers but again with a blank message .If I use ansible to execute command on localhost then I do not get the blank error though. Weird I also have ansible output with color enabled and [ERROR]: shows in red Any ideas what could be causing ansible to give a blank "[ERROR]:" ? Regards, Abey -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b308b575-6678-40aa-b99e-fe955e0af82a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: ec2_group does not honour empty 'rules_egress:'
Hi Barry, works for me if purge_rules and purge_rules_egress is true. - name: Declare api-service ELB security group ec2_group: name: "{{env_prefix}}api-service-elb" description: API Service ELB security group vpc_id: "{{ec2_vpc_id}}" state: present rules: [] rules_egress: [] purge_rules: true purge_rules_egress: true Abey On Tuesday, May 12, 2015 at 10:13:26 AM UTC+1, Barry Kaplan wrote: > > The docs (in the code) say: > > rules_egress: > description: > - List of firewall outbound rules to enforce in this group (see > example). If none are supplied, a default all-out rule is assumed. > If an empty list is supplied, no outbound rules will be enabled. > > And while the code seems to do this: > > if rules_egress is not None: > for rule in rules_egress: >... > elif vpc_id and not module.check_mode: > # when using a vpc, but no egress rules are specified, > # we add in a default allow all out rule, which was the > # default behavior before egress rules were added > default_egress_rule = 'out--1-None-None-None-0.0.0.0/0' > ... > > > The default rule is always created. eg: > > - name: Declare api-service ELB security group > ec2_group: > name: "{{env_prefix}}api-service-elb" > description: API Service ELB security group > vpc_id: "{{ec2_vpc_id}}" > rules: [] > rules_egress: [] > purge_rules: false > purge_rules_egress: false > > > Is '[]' not an empty list? > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/49ec55a1-9fac-4267-a97e-9378603050ed%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] ansible shell module passing backslashes with double quotes
Hi, I am trying to execute the command 'aws --debug waf-regional associate-web-acl --web-acl-id {{ ACLid }} --resource-arn {{ LBARN }}' via module shell or command but I am getting errors. aws command uses the boto and boto is getting requests with backslashes \"WebACLId\" instead of "WebACLId" and \"ResourceArn\" instead of "ResourceArn" Why is ansible command/shell module adding a backslash followed by double quotes? \" How can I remove the backslash? I am using ansible version 2.4.0 from devel with boto 2.46.1 Regards, Abey -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9cef8178-95b2-4f62-8d74-df30b79a5fa4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] command using pipes does not work when using ansible without a playbook
Hi, I would like to use ansible to execute commands on a host. This works ansible -i ./ec2.py 192.168.108.53 -s -u ansible -a "rpm -qa --last kernel" This does not work as expected the output of rpm is given as the final output. I would like to filter the output further. ansible -i ./ec2.py 192.168.108.53 -s -u ansible -a "rpm -qa --last | grep kernel" Any suggestions? Regards, Abey -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a10efbc3-3445-4fcf-aec0-fd46b75dfd75%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] command using pipes does not work when using ansible without a playbook
Hi Kai, Did not know that I had use shell. Thanks . Works OK. ansible -i ./ec2.py 192.168.108.53 -m shell -s -u ansible -a "rpm -qa --last | grep kernel" Regards, Abey On Tuesday, March 27, 2018 at 2:54:19 PM UTC+1, Kai Stian Olstad wrote: > > On Tuesday, 27 March 2018 15.50.48 CEST Abey Thomas wrote: > > I would like to use ansible to execute commands on a host. > > > > This works > > ansible -i ./ec2.py 192.168.108.53 -s -u ansible -a "rpm -qa --last > kernel" > > > > This does not work as expected the output of rpm is given as the final > > output. I would like to filter the output further. > > > > ansible -i ./ec2.py 192.168.108.53 -s -u ansible -a "rpm -qa --last | > grep > > kernel" > > command module doesn't support pipe and redirect, only shell and raw do > that. > > Ansible ad-hoc uses command module as default, so you need add "-m shell" > to make pipes work. > > > -- > Kai Stian Olstad > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2afbde75-3147-4cd9-821d-dc258a6e0523%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.