Re: [ansible-project] Re: Inventory conversion from static to ec2

2019-01-07 Thread Karthick Thanigaimani
Hi, yes, it does like the below that I have shared. from the current code of ansible playbook it is given like below for the execution but this doesnt work for the EC2 / AWS instances.  ansiblePlaybook(                            playbook: 'web.yml',                            inventory:

[ansible-project] Re: Inventory conversion from static to ec2

2019-01-07 Thread jegansignup
Do you want to write dynamic inventory script for you inventory. Does the inventory look as like as below which you have shared else provide exact inventory sample. On Monday, January 7, 2019 at 4:19:01 AM UTC+5:30, karthick t wrote: > > Hi, > > We currently have our inventory as like below

[ansible-project] Ansible module to test remote server availability

2019-01-07 Thread Saravanan
Hi Ansible Experts, We need to enable failover test between 2 remote hosts in Ansible playbook to run tasks. If host1 down then the host2 should be delegated to run the task. If both are down then playbook should exit with an email reporting remote hosts are down. Can you please suggest right

[ansible-project] Ansible - Failover between list of remote

2019-01-07 Thread Saravanan
Hi Ansible Experts, We need to enable failover test between 2 remote hosts in Ansible playbook to run tasks. If host1 down then the host2 should be delegated to run the task. If both are down then playbook should exit with an email reporting remote hosts are down. Can you please suggest right

Re: [ansible-project] Re: Template format error: YAML not well-formed.

2019-01-07 Thread goforawalktwice
ooops ... the error was due to me copy/paste formatting - the second '-name' got indented too far - fixing that indentation makes it valid YAML according to that site On Tuesday, January 8, 2019 at 2:04:24 PM UTC+13, Karl Auer wrote: > > What is the problem that it reports on line 22? > > When

Re: [ansible-project] Re: win_chocolatey does not update programs/features list on the windows target os

2019-01-07 Thread goforawalktwice
ok, you could check that MsiInstall.log for value of ALLUSERS - if it's not '1' and you are installing via a different account to that for viewing Progs/Features then it makes sense. You could try adding ALLUSERS=1 as a property/arg and see what you get Regards, Straff On Friday, January 4,

Re: [ansible-project] Re: Template format error: YAML not well-formed.

2019-01-07 Thread Karl Auer
What is the problem that it reports on line 22? When posting code, please post in a fixed-width font if you can. Makes it easier to check indentation. Regards, K. On Tue, Jan 8, 2019 at 11:58 AM goforawalktwice wrote: > hi, when I paste that YAML to > >

[ansible-project] Re: Template format error: YAML not well-formed.

2019-01-07 Thread goforawalktwice
hi, when I paste that YAML to https://jsonformatter.org/yaml-validator it reckons line 22 is a problem - the second -name entry. When I remove from line 22 down it reckons it's valid YAML. Regards, Straff On Tuesday, January 8, 2019 at 5:34:25 AM UTC+13, Kishore Ponniah wrote: > > Hi all,

[ansible-project] ssl: the specified credentials were rejected by the server

2019-01-07 Thread Ratheessh AV
Hi, I am trying to connect to a windows host using win_ping module. Also enabled Basic and Allowencrypted True on windows hosts as well. But still I am getting the error ""ssl: the specified credentials were rejected by the server" , trying with the local user which is under Adminitsrator

[ansible-project] AWX pause between jobs

2019-01-07 Thread x x
Hi, How can i pause workflow between jobs in AWX ? In the same invetory a can run multiple jobs a same time.. THX -- 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

Re: [ansible-project] AnsibleUndefinedVariable: 'dict object' has no attribute

2019-01-07 Thread Freddie Eisa
I ran the following Tasks: - debug: var: ansible_ssh_host_key_ecdsa_public Received this { "ansible_ssh_host_key_ecdsa_public": "E2VjZHNhLXNoYTItbmlzdHAyNTYIbmlzdHAyNTYAAABBBMj3Y7I/7ByqhoT22sBg2D0tUO8rCVQRTUQXyecCPVfXud9tnInwxXJUI8KKoIScw2YEKQuq8SPB46CE6ce6Bqw=" > On

[ansible-project] Re: Inventory conversion from static to ec2

2019-01-07 Thread Karthick Thanigaimani
Hi, can someone help on this please. Thank you From: Karthick Thanigaimani To: "ansible-project@googlegroups.com" Sent: Monday, 7 January 2019 9:46 AM Subject: Inventory conversion from static to ec2 Hi, We currently have our inventory as like below in the on-prem and we would

Re: [ansible-project] AnsibleUndefinedVariable: 'dict object' has no attribute

2019-01-07 Thread Brian Coca
so one of your hosts is not returning the fact for `ansible_ssh_host_key_ecdsa_public`, its not an issue with the template, but of getting the variable defined in the first place, the 'item' from the error will tell the first host host it is (add ignore_errors:yes and you'll see all the hosts that

Re: [ansible-project] AnsibleUndefinedVariable: 'dict object' has no attribute

2019-01-07 Thread Freddie Eisa
--- - hosts: all tasks: - debug: msg={{ hostvars[item]['ansible_ssh_host_key_ecdsa_public'] }} loop: '{{groups["all"]}}’ My playbook > On Jan 7, 2019, at 12:57 PM, Brian Coca wrote: > > - debug: msg={{ hostvars[item]['ansible_ssh_host_key_ecdsa_public'] }} > loop:

Re: [ansible-project] AnsibleUndefinedVariable: 'dict object' has no attribute

2019-01-07 Thread Freddie Eisa
"The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_ssh_host_key_ecdsa_public'\n\nThe error appears to have been in '/home/feisa/ansible-linux/test_single_server.yml': line 6, column 6, but may\nbe

Re: [ansible-project] synchronize between two remote servers

2019-01-07 Thread John Harmon
I have it working. Kai was right, I couldn't use rsync:\\. When specifying a delegation all I have to do is specify the correct destination: working: - name: "Retrieve backups from mybackup02" synchronize: src: /dbbackup/nonprod_images/ dest: "{{ one_week }}/" #<---

Re: [ansible-project] AnsibleUndefinedVariable: 'dict object' has no attribute

2019-01-07 Thread Brian Coca
can you do this debug: - debug: msg={{ hostvars[item]['ansible_ssh_host_key_ecdsa_public'] }} loop: '{{groups["all"]}}' -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

Re: [ansible-project] AnsibleUndefinedVariable: 'dict object' has no attribute

2019-01-07 Thread Freddie Eisa
Getting this now. localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_ssh_host_key_ecdsa_public'"} I debug the facts and see it > On Jan 7, 2019, at 9:53 AM, Hugo Gonzalez wrote: > > {% for host in

Re: [ansible-project] Find matched element in key value

2019-01-07 Thread Kai Stian Olstad
On Monday, 7 January 2019 17:21:41 CET Rama wrote: > Hi All, > > Our required in-built module gives huge output of different keys that have > multiple values with objects. I used 'with_dict' and when to narrow and get > desired output as below. Here also am facing a road block that how can I

Re: [ansible-project] AnsibleUndefinedVariable: 'dict object' has no attribute

2019-01-07 Thread Hugo Gonzalez
Can you try removing the " ignore_errors:yes "you had before? Maybe something in failing in the facts gathering and, naturally, the variables did not get populated. Here's the full playbook and template I used to test (this does not even need to escalate privileges): --- - hosts: all  

Re: [ansible-project] Template format error: YAML not well-formed.

2019-01-07 Thread Kishore Ponniah
Yes, it did show the line number (line 12, column 6). I checked the line with tab and space - name: get sts session token I did not make any update on this section. The only change I made was instead of template_body, I changed to template_url. On Monday, January 7, 2019 at 4:38:53 PM

Re: [ansible-project] Template format error: YAML not well-formed.

2019-01-07 Thread Karthik Chandrashekar
It would have shown line number as well in the error. Please look into yaml file. May be it could be an issue with unnecessary tab/space. Regards, Karthik.C On Mon 7 Jan, 2019, 10:04 PM Kishore Ponniah Hi all, > > My cloudformation template has exceeded the template body limit more than >

[ansible-project] Re: Template format error: YAML not well-formed.

2019-01-07 Thread Kishore Ponniah
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the CreateChangeSet operation: Template format error: YAML not well-formed. (line 12, column 6) On Monday, January

[ansible-project] Template format error: YAML not well-formed.

2019-01-07 Thread Kishore Ponniah
Hi all, My cloudformation template has exceeded the template body limit more than 51200 bytes and I am trying to upload to s3 and deploy using cross account. I used template_url parameter in the playbook but giving an error. Before adding template_url, I had template_body which was working

Re: [ansible-project] AnsibleUndefinedVariable: 'dict object' has no attribute

2019-01-07 Thread Freddie Eisa
Same error, can you send full playbook details over you are testing? localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_ssh_host_key_ecdsa_public'"} > On Jan 4, 2019, at 11:47 AM, Hugo Gonzalez

Re: [ansible-project] AnsibleUndefinedVariable: 'dict object' has no attribute

2019-01-07 Thread Freddie Eisa
No luck so far > On Jan 4, 2019, at 11:47 AM, Hugo Gonzalez wrote: > > >> template: >> >> {% for host in groups['all'] %} >> {{ hostvars[host]['ansible_facts']['ssh_host_key_ecdsa_public'] }} >> {% endfor %} >> >> > This template also works for me, and the keys are different. So you

[ansible-project] Find matched element in key value

2019-01-07 Thread Rama
Hi All, Our required in-built module gives huge output of different keys that have multiple values with objects. I used 'with_dict' and when to narrow and get desired output as below. Here also am facing a road block that how can I get the element where any value doesn't meet. How can get

Re: [ansible-project] "become" not working on centos 7 hosts

2019-01-07 Thread James Cassell
On Wed, Jan 2, 2019, at 8:57 AM, John.1209 wrote: > I've got ansible setup in a centos 6 & 7 environment. The Centos 6 hosts > all work fine. The centos 7 hosts work, but I cannot use "become" with > centos 7. It works with Centos 6, and non-root commands work with centos > 7. Here is a

Re: [ansible-project] AnsibleUndefinedVariable: 'dict object' has no attribute

2019-01-07 Thread Freddie Eisa
Ill test today > On Jan 4, 2019, at 11:47 AM, Hugo Gonzalez wrote: > > >> template: >> >> {% for host in groups['all'] %} >> {{ hostvars[host]['ansible_facts']['ssh_host_key_ecdsa_public'] }} >> {% endfor %} >> >> > This template also works for me, and the keys are different. So you

Re: [ansible-project] Re: aws_ec2 inventory plugin brings up empty list

2019-01-07 Thread Marcelo T Melo
It worked, thank you. [image: Aurea] *Marcelo T Melo* Java Chief Software Architect marcelo.m...@aurea.com Skype: marcelotmelo www.aurea.com On Mon, Jan 7, 2019 at 8:56 AM wrote: > Please see below suggestion for your query > > > *+ Example playbook* > > >

[ansible-project] Re: aws_ec2 inventory plugin brings up empty list

2019-01-07 Thread jegansignup
Please see below suggestion for your query *+ Example playbook* plugin: aws_ec2 boto_profile: default * #AWS profile name which is in .aws/credentials file* regions: - us-east-1 hostnames: - private-ip-address *+ Edit your ec.ini file as below * >From : vpc_destination_variable