[ansible-project] Issue with local_action copy content

2018-11-19 Thread Vamsi Krishna
HI All,

I am developing below play for patching but stuck with local action copy 
content module. Please let me know what I am missing here

Code:-
---
- hosts: "{{ host }}"
  become: yes
  become_method: sudo
  tasks:
- name: Running prepatch info commands
  shell: |
echo -e "\nuname -a"
echo ""
uname -a
echo -e "\nrunlevel"
echo ""
runlevel
register: prepatch
  ignore_errors: True
  no_log: True
- name: Removing old prepatch info file
  local_action: file path=/ansible_work/outputfolder/patch/{{ 
inventory_hostname }}-prepatch.txt state=absent
- name: Storing prepatch info to directory outputfolder
  local_action: copy content={{ prepatch.stdout }} 
dest=/ansible_work/outputfolder/patch/{{ inventory_hostname }}-prepatch.txt

Error:

fatal: [Server]: FAILED! => {"msg": "The task includes an option with an 
undefined variable. The error was: 'dict object' has no attribute 
'stdout'\n\nThe error appears to have been in 
'/home/patrol_svc/patching.yml': line 115, column 7, but may\nbe elsewhere 
in the file depending on the exact syntax problem.\n\nThe offending line 
appears to be:\n\n  local_action: file path=/home/patrol_svc/{{ 
inventory_hostname }}-prepatch.txt state=absent\n- name: Storing 
prepatch info to directory outputfolder\n  ^ here\n"}
fatal: [IP]: FAILED! => {"msg": "The task includes an option with an 
undefined variable. The error was: 'dict object' has no attribute 
'stdout'\n\nThe error appears to have been in 
'/home/patrol_svc/patching.yml': line 115, column 7, but may\nbe elsewhere 
in the file depending on the exact syntax problem.\n\nThe offending line 
appears to be:\n\n  local_action: file path=/home/patrol_svc/{{ 
inventory_hostname }}-prepatch.txt state=absent\n- name: Storing 
prepatch info to directory outputfolder\n  ^ here\n"}

Best Regards
Vamsi

-- 
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/bcf0684f-376d-448c-9afc-1693f25582c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] How to execute a SQL Script ( MS SQL 2014 SP2 ) by Ansible

2018-11-19 Thread Dick Visser
There is no specific mssql query module part of ansible itself, but a 3rd
party module does exist for this purpose:
https://github.com/melmorabity/ansible-mssql-query
If you can, report on its usability.

Dick

On Tue, 20 Nov 2018 at 05:36, ameya agashe  wrote:

> Hello Guys,
>
> I have copied a script on MS SQL server on c:\temp\always-on.sql
>
> I'm wondering how to have it executed by Ansible, win_shell module? or is
> there any specialized module for MSSQL for Ansible?
>
> Kindly assist
>
> Thanks
> Ameya Agashe
>
> --
> 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/CAG9tf-9fwrSLU6RWeRbzV5fwiHJRL%3D1P9PNnkVvLEdBP72D2_g%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Sent from a mobile device - please excuse the brevity, spelling and
punctuation.

-- 
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/CAL8fbwOQD_VELsvJN%2BcvmQUQnO%3D8u5PqrSagUFFg%2BuchpXko8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Guidance on provisioning 2 node GKE cluster on Google Cloud using Ansible

2018-11-19 Thread somali . batra
Hi,

I need to automate the provisioning of 2 node GKE cluster using Ansible. 
Appreciate, if someone can direct me to a tutorial or any kind of guidance 
in this regard.

Thank you very much!

Regards,
Somali


-- 
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/97193853-3425-451b-aed7-8f2bc56d8daf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] How to execute a SQL Script ( MS SQL 2014 SP2 ) by Ansible

2018-11-19 Thread ameya agashe
Hello Guys,

I have copied a script on MS SQL server on c:\temp\always-on.sql

I'm wondering how to have it executed by Ansible, win_shell module? or is
there any specialized module for MSSQL for Ansible?

Kindly assist

Thanks
Ameya Agashe

-- 
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/CAG9tf-9fwrSLU6RWeRbzV5fwiHJRL%3D1P9PNnkVvLEdBP72D2_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Any Tool to write ansible because to many syntax issue are getting in terminal.?

2018-11-19 Thread Jonathan Lozada De La Matta
well a lot of this tools are to do that more automated or give you more
insight before you get to the point of running them.

On Mon, Nov 19, 2018 at 11:04 PM Linux Tech 
wrote:

> when ever i try to write something in ansible yml file it always show me
> syntax error.
>
> --
> 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/28bd12f2-7ae1-4f74-ae1e-18310aa9096a%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Jonathan lozada de la matta

AUTOMATION PRACTICE

-- 
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/CAFYJA%2BLVP6cAq4N4509zX13HbJquS0zcG%3DMz_PhOVK7yh2hqLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Any Tool to write ansible because to many syntax issue are getting in terminal.?

2018-11-19 Thread Linux Tech
when ever i try to write something in ansible yml file it always show me 
syntax error.

-- 
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/28bd12f2-7ae1-4f74-ae1e-18310aa9096a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_default_ipv4'"}

2018-11-19 Thread Tom K.
Kool.  So it's really saying (bolded):

ansible-playbook -i infra --limit mysql06 main.yml --tags "mysql" -v --check

fatal: [mysql06]: FAILED! => {"changed": false, "msg": 
"AnsibleUndefinedVariable: 
'ansible.vars.hostvars.HostVarsVars object' has no attribute 
'ansible_default_ipv4' *for mysql05.*"}

Makes sense.  Ty.

Cheers,
TK

On Monday, November 19, 2018 at 9:24:16 AM UTC-5, Kai Stian Olstad wrote:
>
> On Monday, 19 November 2018 07:34:17 CET Tom K. wrote: 
> > ansible-playbook -i infra --limit mysql06 main.yml --tags "mysql" -v 
> --check 
> > 
> > fatal: [mysql06]: FAILED! => {"changed": false, "msg": 
> "AnsibleUndefinedVariable: 
> > 'ansible.vars.hostvars.HostVarsVars object' has no attribute 
> > 'ansible_default_ipv4'"} 
> > 
> > But it seems to work opposite to the way described above (Apologies if 
> I'm 
> > misreading).  The error is thrown for ANY host that I use the *--limit* 
> > flag on, not the ones that I don't use the limit on.   
> > 
> > I would have expected it to gather facts on the host I'm limiting the 
> run 
> > too, not the ones I'm excluding.   
>
> Yes, it's only gathering facts on the host in the limit. 
>
> The error message isn't about that it can't find ansible_default_ipv4 on 
> the host in the limit (mysql06), it's about mysql06 cant find 
> ansible_default_ipv4 for host mysql05. 
>
>
> -- 
> 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/b26ec5d3-6508-4272-9a24-8c96e1acaaef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Ansible ssh fails to connect to host via ssh. Permission denied - Raw ssh works

2018-11-19 Thread Arvind Thatikonda
Hi Fabio,
I am not using the playbook for this particular task, I am creating an
ansible control server and client. I am trying to connect from control
server to client after generating the ssh keys.
I used ssh-keygen on ubuntu server using ansible user.  I am setting a
passwordless connection from the ansible control server /localhost to
client.




On Mon, Nov 19, 2018 at 6:47 PM Fabio Gomes Sakiyama <
fabiosakiy...@gmail.com> wrote:

> Hi Arvind,
>
> It was pretty simple 'cause I was messing up the users.
>
> Are you running your playbook with root? Which user you set on your hosts
> as ansible_user? Are you using become inside your playbooks?
> Also, I stopped using ssh, instead I'm using openstack keypair.
>
> And try Dave's suggestion, it's very useful:
>
> Hi Fabio,
>>
>> I see you found a solution, but this is what I'd recommend doing next
>> time.
>>
>> Add -vvv and read the resulting output carefully. You can splice the ssh
>> command from Ansible back into the shell to work out what is missing or
>> different to just running ssh@ locally.
>>
>> Usually this is because the username is different or you’re using a
>> different ssh key than expected.
>>
> e.g.:
>> $ ansible-playbook site.yml --diff --check -vvv
>>
>> Gathering Facts...
>> Using module file
>> /usr/local/lib/python2.7/site-packages/ansible/modules/system/setup.py
>>  ESTABLISH SSH CONNECTION FOR USER: root
>> Using module file
>> /usr/local/lib/python2.7/site-packages/ansible/modules/system/setup.py
>>  SSH: EXEC ssh -F ./ssh_config -o StrictHostKeyChecking=no -o
>> Port=2200 -o KbdInteractiveAuthentication=no -o
>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
>> -o PasswordAuthentication=no -o User=root -o ConnectTimeout=30 -tt
>> i09.com 'which -s jailme'
>>  ESTABLISH SSH CONNECTION FOR USER: ansible
>>  SSH: EXEC ssh -F ./ssh_config -o StrictHostKeyChecking=no -o
>> Port=2200 -o KbdInteractiveAuthentication=no -o
>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
>> -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=30 i09.com 
>> '/bin/sh
>> -c '"'"'/usr/local/bin/python2.7 && sleep 0'"'"''
>>  (255, '', 'root@i09com: Permission denied (publickey).\r\n')
>>
>
>
> And finally, if possible, post your playbook.
>
>
> On Mon, Nov 19, 2018 at 8:14 PM Arvind Thatikonda 
> wrote:
>
>> Hi Fabio,
>> can you please clarify how you managed to solve it. I created user
>> ansible, the public keys ID_RSA.pub are stored under /home/ansible/.ssh
>> folders. the ssh-copy-id should copy to target server - client when I run
>> ssh-copy-id ansible@privateip.
>> I create same user name 'ansible' on remote server.
>> I get permission denied error.
>>
>>
>> On Tuesday, October 9, 2018 at 10:16:26 AM UTC-4, Fabio Gomes Sakiyama
>> wrote:
>>>
>>> Hi Chen,
>>>
>>> I manage to solve the problem. I need to pass the public key of a
>>> different user. In addition, I changed the way to connect to the VMs, since
>>> I am using openstack, I configured ansible to use the keypair to connect.
>>>
>>> Thanks
>>>
>>> Em segunda-feira, 8 de outubro de 2018 23:47:35 UTC-3, chenchireddy
>>> guvvala escreveu:

 As I am aware Ansible always assumes jobs are running SSH keys either
 local system or remote system.

 Thanks.

 On Tuesday, October 9, 2018 at 7:35:42 AM UTC+5:30, Fabio Gomes
 Sakiyama wrote:
>
> Hi Chen,
>
> I'm aware of ssh-key gen and ssh-copy-id. The ansible module
> "authorized_keys" does the ssh-copy-id for me, so I don't need to run it
> manually.
>
> The ssh works because when I execute ''ssh root@myAddress", it works
> perfectly.
> The problem is when doing exact the same thing, but with ansible.
>
>
> Em segunda-feira, 8 de outubro de 2018 22:48:44 UTC-3, chenchireddy
> guvvala escreveu:
>>
>> Hi,
>>
>> *ssh-keygen* creates the public and private keys.* ssh-copy-id* copies
>> the local-host’s public key to the remote-host’s authorized_keys file.
>> ssh-copy-id also assigns proper permission to the remote-host’s home,
>> ~/.ssh, and ~/.ssh/authorized_keys.
>>
>> Check host entry in /etc/host file
>> 127.0.0.1 localhost
>>
>> Check command# ansible localhost -m ping -vv
>>
>> Thanks.
>>
>> On Tuesday, October 9, 2018 at 6:52:49 AM UTC+5:30, Fabio Gomes
>> Sakiyama wrote:
>>>
>>> Hello guys,
>>>
>>> I'm trying to use the ansible_authorized keys to create VMs (with
>>> packer and terraform), adding my workspace key to VMs authorized keys.
>>> I think it worked because if I execute ''ssh root@myVM", it
>>> connects without asking password.
>>>
>>> But when I execute "ansible all -m ping -u root" to that same host,
>>> it fails with the error "sshh fails to connect to host via ssh. 
>>> Permission
>>> denied".
>>>
>>> I'm really confused and struggling to understand that, since a r

Re: [ansible-project] Re: Ansible ssh fails to connect to host via ssh. Permission denied - Raw ssh works

2018-11-19 Thread Fabio Gomes Sakiyama
Hi Arvind,

It was pretty simple 'cause I was messing up the users.

Are you running your playbook with root? Which user you set on your hosts
as ansible_user? Are you using become inside your playbooks?
Also, I stopped using ssh, instead I'm using openstack keypair.

And try Dave's suggestion, it's very useful:

Hi Fabio,
>
> I see you found a solution, but this is what I'd recommend doing next time.
>
> Add -vvv and read the resulting output carefully. You can splice the ssh
> command from Ansible back into the shell to work out what is missing or
> different to just running ssh@ locally.
>
> Usually this is because the username is different or you’re using a
> different ssh key than expected.
>
e.g.:
> $ ansible-playbook site.yml --diff --check -vvv
>
> Gathering Facts...
> Using module file
> /usr/local/lib/python2.7/site-packages/ansible/modules/system/setup.py
>  ESTABLISH SSH CONNECTION FOR USER: root
> Using module file
> /usr/local/lib/python2.7/site-packages/ansible/modules/system/setup.py
>  SSH: EXEC ssh -F ./ssh_config -o StrictHostKeyChecking=no -o
> Port=2200 -o KbdInteractiveAuthentication=no -o
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
> -o PasswordAuthentication=no -o User=root -o ConnectTimeout=30 -tt i09.com 
> 'which
> -s jailme'
>  ESTABLISH SSH CONNECTION FOR USER: ansible
>  SSH: EXEC ssh -F ./ssh_config -o StrictHostKeyChecking=no -o
> Port=2200 -o KbdInteractiveAuthentication=no -o
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
> -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=30 i09.com 
> '/bin/sh
> -c '"'"'/usr/local/bin/python2.7 && sleep 0'"'"''
>  (255, '', 'root@i09com: Permission denied (publickey).\r\n')
>


And finally, if possible, post your playbook.


On Mon, Nov 19, 2018 at 8:14 PM Arvind Thatikonda 
wrote:

> Hi Fabio,
> can you please clarify how you managed to solve it. I created user
> ansible, the public keys ID_RSA.pub are stored under /home/ansible/.ssh
> folders. the ssh-copy-id should copy to target server - client when I run
> ssh-copy-id ansible@privateip.
> I create same user name 'ansible' on remote server.
> I get permission denied error.
>
>
> On Tuesday, October 9, 2018 at 10:16:26 AM UTC-4, Fabio Gomes Sakiyama
> wrote:
>>
>> Hi Chen,
>>
>> I manage to solve the problem. I need to pass the public key of a
>> different user. In addition, I changed the way to connect to the VMs, since
>> I am using openstack, I configured ansible to use the keypair to connect.
>>
>> Thanks
>>
>> Em segunda-feira, 8 de outubro de 2018 23:47:35 UTC-3, chenchireddy
>> guvvala escreveu:
>>>
>>> As I am aware Ansible always assumes jobs are running SSH keys either
>>> local system or remote system.
>>>
>>> Thanks.
>>>
>>> On Tuesday, October 9, 2018 at 7:35:42 AM UTC+5:30, Fabio Gomes Sakiyama
>>> wrote:

 Hi Chen,

 I'm aware of ssh-key gen and ssh-copy-id. The ansible module
 "authorized_keys" does the ssh-copy-id for me, so I don't need to run it
 manually.

 The ssh works because when I execute ''ssh root@myAddress", it works
 perfectly.
 The problem is when doing exact the same thing, but with ansible.


 Em segunda-feira, 8 de outubro de 2018 22:48:44 UTC-3, chenchireddy
 guvvala escreveu:
>
> Hi,
>
> *ssh-keygen* creates the public and private keys.* ssh-copy-id* copies
> the local-host’s public key to the remote-host’s authorized_keys file.
> ssh-copy-id also assigns proper permission to the remote-host’s home,
> ~/.ssh, and ~/.ssh/authorized_keys.
>
> Check host entry in /etc/host file
> 127.0.0.1 localhost
>
> Check command# ansible localhost -m ping -vv
>
> Thanks.
>
> On Tuesday, October 9, 2018 at 6:52:49 AM UTC+5:30, Fabio Gomes
> Sakiyama wrote:
>>
>> Hello guys,
>>
>> I'm trying to use the ansible_authorized keys to create VMs (with
>> packer and terraform), adding my workspace key to VMs authorized keys.
>> I think it worked because if I execute ''ssh root@myVM", it connects
>> without asking password.
>>
>> But when I execute "ansible all -m ping -u root" to that same host,
>> it fails with the error "sshh fails to connect to host via ssh. 
>> Permission
>> denied".
>>
>> I'm really confused and struggling to understand that, since a raw
>> ssh works and the ansible ssh doesn't.
>>
>> What am I missing??
>>
>> Thanks in advance!
>>
> --
> 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/zE6uQpLdlkE/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

Re: [ansible-project] Ansible report

2018-11-19 Thread Alfredo De Luca
Cheers. Really appreciated.
I ll have a look at ARA soon
Thanks



On Tue, Nov 20, 2018 at 12:08 AM Jonathan Lozada De La Matta <
jloza...@redhat.com> wrote:

> For more enterprise logging and sending to a log aggravator then AWX/Tower
> https://www.ansible.com/products/tower & https://github.com/ansible/awx
> If you just need an UI to see the ansible runs then I suggest you try
> Ansible Ara https://github.com/openstack/ara
>
> On Mon, Nov 19, 2018 at 6:01 PM Alfredo De Luca 
> wrote:
>
>> Hi Jonathan. Mostly logs/reports for now. Then we ll evaluate an
>> enterprise solution.
>> cheers
>>
>>
>> On Mon, Nov 19, 2018 at 11:51 PM Jonathan Lozada De La Matta <
>> jloza...@redhat.com> wrote:
>>
>>> Are you looking for more enterprise central features or just a place to
>>> see more the output/logs/reports?
>>>
>>>
>>>
>>> On Mon, Nov 19, 2018 at 5:44 PM Alfredo De Luca <
>>> alfredo.del...@gmail.com> wrote:
>>>
 Hi all.
 We run ansible in about 100 VM through Openstack and in the near future
 we will implement ansible pull or run ansible from a central workstation to
 all those nodes.
 I wonder if there is a sort of report (possibly on web) of each run and
 things changed that I can implement too. I heard about ansible semaphore
 but do you know any other way/tools to do so?

 Cheers


 --
 *Alfredo*

 --
 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/CAAWpFTHdmriPvNaymMRV2FdkiNhH0h5eQWann0X95JQtrxcXkA%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>> --
>>>
>>> Jonathan lozada de la matta
>>>
>>> AUTOMATION PRACTICE
>>>
>>>
>>>
>>>
>>> --
>>> 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/CAFYJA%2BL9ogdtvgPyCy8Hva%3Dx2zW-87TS-1KP26E_sOjnbn8Nqw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> *Alfredo*
>>
>> --
>> 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/CAAWpFTHQW8%3D8BC6CNFRuY8OA%2B_Fmb_LW28xyZ6cA0LFOUHwd5g%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
> Jonathan lozada de la matta
>
> AUTOMATION PRACTICE
>
>
>
>
> --
> 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/CAFYJA%2BJp2mr3zD46SakR697HjbGSzuCmxwmhzGEx%2BZWUJKHG4g%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
*Alfredo*

-- 
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/CAAWpFTGU5-7DQJ_-KS-BhEToy3j-jCYinF0AqQDmDgFvahyJUA%40mail.gmail.com.
For more options, visit https:/

Re: [ansible-project] Ansible report

2018-11-19 Thread Jonathan Lozada De La Matta
For more enterprise logging and sending to a log aggravator then AWX/Tower
https://www.ansible.com/products/tower & https://github.com/ansible/awx
If you just need an UI to see the ansible runs then I suggest you try
Ansible Ara https://github.com/openstack/ara

On Mon, Nov 19, 2018 at 6:01 PM Alfredo De Luca 
wrote:

> Hi Jonathan. Mostly logs/reports for now. Then we ll evaluate an
> enterprise solution.
> cheers
>
>
> On Mon, Nov 19, 2018 at 11:51 PM Jonathan Lozada De La Matta <
> jloza...@redhat.com> wrote:
>
>> Are you looking for more enterprise central features or just a place to
>> see more the output/logs/reports?
>>
>>
>>
>> On Mon, Nov 19, 2018 at 5:44 PM Alfredo De Luca 
>> wrote:
>>
>>> Hi all.
>>> We run ansible in about 100 VM through Openstack and in the near future
>>> we will implement ansible pull or run ansible from a central workstation to
>>> all those nodes.
>>> I wonder if there is a sort of report (possibly on web) of each run and
>>> things changed that I can implement too. I heard about ansible semaphore
>>> but do you know any other way/tools to do so?
>>>
>>> Cheers
>>>
>>>
>>> --
>>> *Alfredo*
>>>
>>> --
>>> 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/CAAWpFTHdmriPvNaymMRV2FdkiNhH0h5eQWann0X95JQtrxcXkA%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>>
>> Jonathan lozada de la matta
>>
>> AUTOMATION PRACTICE
>>
>>
>>
>>
>> --
>> 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/CAFYJA%2BL9ogdtvgPyCy8Hva%3Dx2zW-87TS-1KP26E_sOjnbn8Nqw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> *Alfredo*
>
> --
> 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/CAAWpFTHQW8%3D8BC6CNFRuY8OA%2B_Fmb_LW28xyZ6cA0LFOUHwd5g%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Jonathan lozada de la matta

AUTOMATION PRACTICE

-- 
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/CAFYJA%2BJp2mr3zD46SakR697HjbGSzuCmxwmhzGEx%2BZWUJKHG4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible report

2018-11-19 Thread Alfredo De Luca
Hi Jonathan. Mostly logs/reports for now. Then we ll evaluate an enterprise
solution.
cheers


On Mon, Nov 19, 2018 at 11:51 PM Jonathan Lozada De La Matta <
jloza...@redhat.com> wrote:

> Are you looking for more enterprise central features or just a place to
> see more the output/logs/reports?
>
>
>
> On Mon, Nov 19, 2018 at 5:44 PM Alfredo De Luca 
> wrote:
>
>> Hi all.
>> We run ansible in about 100 VM through Openstack and in the near future
>> we will implement ansible pull or run ansible from a central workstation to
>> all those nodes.
>> I wonder if there is a sort of report (possibly on web) of each run and
>> things changed that I can implement too. I heard about ansible semaphore
>> but do you know any other way/tools to do so?
>>
>> Cheers
>>
>>
>> --
>> *Alfredo*
>>
>> --
>> 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/CAAWpFTHdmriPvNaymMRV2FdkiNhH0h5eQWann0X95JQtrxcXkA%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
> Jonathan lozada de la matta
>
> AUTOMATION PRACTICE
>
>
>
>
> --
> 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/CAFYJA%2BL9ogdtvgPyCy8Hva%3Dx2zW-87TS-1KP26E_sOjnbn8Nqw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
*Alfredo*

-- 
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/CAAWpFTHQW8%3D8BC6CNFRuY8OA%2B_Fmb_LW28xyZ6cA0LFOUHwd5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible report

2018-11-19 Thread Jonathan Lozada De La Matta
Are you looking for more enterprise central features or just a place to see
more the output/logs/reports?



On Mon, Nov 19, 2018 at 5:44 PM Alfredo De Luca 
wrote:

> Hi all.
> We run ansible in about 100 VM through Openstack and in the near future we
> will implement ansible pull or run ansible from a central workstation to
> all those nodes.
> I wonder if there is a sort of report (possibly on web) of each run and
> things changed that I can implement too. I heard about ansible semaphore
> but do you know any other way/tools to do so?
>
> Cheers
>
>
> --
> *Alfredo*
>
> --
> 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/CAAWpFTHdmriPvNaymMRV2FdkiNhH0h5eQWann0X95JQtrxcXkA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Jonathan lozada de la matta

AUTOMATION PRACTICE

-- 
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/CAFYJA%2BL9ogdtvgPyCy8Hva%3Dx2zW-87TS-1KP26E_sOjnbn8Nqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible report

2018-11-19 Thread Alfredo De Luca
Hi all.
We run ansible in about 100 VM through Openstack and in the near future we
will implement ansible pull or run ansible from a central workstation to
all those nodes.
I wonder if there is a sort of report (possibly on web) of each run and
things changed that I can implement too. I heard about ansible semaphore
but do you know any other way/tools to do so?

Cheers


-- 
*Alfredo*

-- 
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/CAAWpFTHdmriPvNaymMRV2FdkiNhH0h5eQWann0X95JQtrxcXkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ansible ssh fails to connect to host via ssh. Permission denied - Raw ssh works

2018-11-19 Thread Arvind Thatikonda
Hi Fabio,
can you please clarify how you managed to solve it. I created user ansible, 
the public keys ID_RSA.pub are stored under /home/ansible/.ssh folders. the 
ssh-copy-id should copy to target server - client when I run 
ssh-copy-id ansible@privateip. 
I create same user name 'ansible' on remote server. 
I get permission denied error.


On Tuesday, October 9, 2018 at 10:16:26 AM UTC-4, Fabio Gomes Sakiyama 
wrote:
>
> Hi Chen,
>
> I manage to solve the problem. I need to pass the public key of a 
> different user. In addition, I changed the way to connect to the VMs, since 
> I am using openstack, I configured ansible to use the keypair to connect.
>
> Thanks
>
> Em segunda-feira, 8 de outubro de 2018 23:47:35 UTC-3, chenchireddy 
> guvvala escreveu:
>>
>> As I am aware Ansible always assumes jobs are running SSH keys either 
>> local system or remote system.
>>
>> Thanks.
>>
>> On Tuesday, October 9, 2018 at 7:35:42 AM UTC+5:30, Fabio Gomes Sakiyama 
>> wrote:
>>>
>>> Hi Chen,
>>>
>>> I'm aware of ssh-key gen and ssh-copy-id. The ansible module 
>>> "authorized_keys" does the ssh-copy-id for me, so I don't need to run it 
>>> manually.
>>>
>>> The ssh works because when I execute ''ssh root@myAddress", it works 
>>> perfectly.
>>> The problem is when doing exact the same thing, but with ansible.
>>>
>>>
>>> Em segunda-feira, 8 de outubro de 2018 22:48:44 UTC-3, chenchireddy 
>>> guvvala escreveu:

 Hi,

 *ssh-keygen* creates the public and private keys.* ssh-copy-id* copies 
 the local-host’s public key to the remote-host’s authorized_keys file. 
 ssh-copy-id also assigns proper permission to the remote-host’s home, 
 ~/.ssh, and ~/.ssh/authorized_keys.

 Check host entry in /etc/host file
 127.0.0.1 localhost

 Check command# ansible localhost -m ping -vv

 Thanks.

 On Tuesday, October 9, 2018 at 6:52:49 AM UTC+5:30, Fabio Gomes 
 Sakiyama wrote:
>
> Hello guys,
>
> I'm trying to use the ansible_authorized keys to create VMs (with 
> packer and terraform), adding my workspace key to VMs authorized keys.
> I think it worked because if I execute ''ssh root@myVM", it connects 
> without asking password.
>
> But when I execute "ansible all -m ping -u root" to that same host, it 
> fails with the error "sshh fails to connect to host via ssh. Permission 
> denied".
>
> I'm really confused and struggling to understand that, since a raw ssh 
> works and the ansible ssh doesn't.
>
> What am I missing??
>
> Thanks in advance!
>


-- 
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/20213015-3728-4271-b397-4b4142208a70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] ssh-copy-id error

2018-11-19 Thread Arvind Thatikonda


I created a ansible control server, and client server. I created 'ansible' 
users on both control and remote client server. I created ssh keys use 
ssh-keygen, I tried to copy the ssh keys ( public key) to remote client 
using ssh-copy-id it fails. The OS on the two servers is Ubuntu 18.04 LTS 
on GCP


Please let me know what is the issue. looks like permission issue. I 
followed the some recommednation to update the sshd-congfiguration files to 
change parameters. But it still didn't work.


/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: 
"/home/ansible/.ssh/id_rsa.pub"

/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to 
filter out any that are already installed

/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are 
prompted now it is to install the new keys

Permission denied (publickey).






-- 
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/e40053b4-a0e3-4d9c-a7c2-c64506ccb663%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] ansible-pull minimal standalone version

2018-11-19 Thread Brian Coca
Most modules are a single file, the 'multiple files' are normally 'non
python modules'  and the .py that holds the documentation. Since
Ansible only ships with python and powershell modules you would only
have multiple files for .ps1 modules.
-- 
--
Brian Coca

-- 
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/CACVha7e04LUzw8kyQ6qO-pExu6ya_M74149rzpkv05pEfZO1dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: How to copy a file from localhost (Ansible Tower server) to remote host in Ansible playbook?

2018-11-19 Thread Saravanan
I have a temporary file created on Ansible Tower and able to send it via 
email. Additionally I would like to copy this file to remote server on some 
path. Can you please help me with this requirement?

On Monday, 19 November 2018 16:35:53 UTC-5, Jonathan Lozada De La Matta 
wrote:
>
> do you have the file in all the nodes?
>
> On Mon, Nov 19, 2018 at 4:25 PM Saravanan > 
> wrote:
>
>> I am getting source not found error while copying a file from Ansible 
>> Tower server to remote server. Actually file is available in the local path 
>> of Ansible Tower server. Any help is much appreciated.
>>
>> On Monday, 19 November 2018 09:15:39 UTC-5, Saravanan wrote:
>>>
>>> Hi Ansible Experts,
>>> Need to copy a file from Ansible tower server to remote server using 
>>> copy module. Can you please help to achieve this using copy module or any 
>>> other module in Ansible?
>>>
>>> ---
>>> - name: Copy file to remote server
>>>   gather_facts: no
>>>   hosts: 127.0.0.1
>>>
>>>   tasks:
>>>
>>>- name: Copy JSON file to remote server
>>>   copy:
>>> dest: /apps/web/scripts/json
>>> src: /tmp/report.json
>>> remote_src: no
>>> owner: user
>>> group: group
>>> mode: 0644
>>>   delegate_to: remote_server
>>>   become_user: awx
>>>   become: no
>>>
>>>
>>>
>>>
>>> -- 
>> 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-proje...@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/993a7441-8ea0-4181-9e87-4bfb715876ea%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
>
> Jonathan lozada de la matta
>
> AUTOMATION PRACTICE
>
>
>  
>
>

-- 
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/43718522-1f19-4dcb-bd5e-b2168461d6e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: How to copy a file from localhost (Ansible Tower server) to remote host in Ansible playbook?

2018-11-19 Thread Jonathan Lozada De La Matta
do you have the file in all the nodes?

On Mon, Nov 19, 2018 at 4:25 PM Saravanan  wrote:

> I am getting source not found error while copying a file from Ansible
> Tower server to remote server. Actually file is available in the local path
> of Ansible Tower server. Any help is much appreciated.
>
> On Monday, 19 November 2018 09:15:39 UTC-5, Saravanan wrote:
>>
>> Hi Ansible Experts,
>> Need to copy a file from Ansible tower server to remote server using copy
>> module. Can you please help to achieve this using copy module or any other
>> module in Ansible?
>>
>> ---
>> - name: Copy file to remote server
>>   gather_facts: no
>>   hosts: 127.0.0.1
>>
>>   tasks:
>>
>>- name: Copy JSON file to remote server
>>   copy:
>> dest: /apps/web/scripts/json
>> src: /tmp/report.json
>> remote_src: no
>> owner: user
>> group: group
>> mode: 0644
>>   delegate_to: remote_server
>>   become_user: awx
>>   become: no
>>
>>
>>
>>
>> --
> 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/993a7441-8ea0-4181-9e87-4bfb715876ea%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Jonathan lozada de la matta

AUTOMATION PRACTICE

-- 
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/CAFYJA%2BJChJn-hdEjXQdowL4HwAXx76J3%2B48P4XZxa1T1%3DM-rVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: How to copy a file from localhost (Ansible Tower server) to remote host in Ansible playbook?

2018-11-19 Thread Saravanan
I am getting source not found error while copying a file from Ansible Tower 
server to remote server. Actually file is available in the local path of 
Ansible Tower server. Any help is much appreciated.

On Monday, 19 November 2018 09:15:39 UTC-5, Saravanan wrote:
>
> Hi Ansible Experts,
> Need to copy a file from Ansible tower server to remote server using copy 
> module. Can you please help to achieve this using copy module or any other 
> module in Ansible?
>
> ---
> - name: Copy file to remote server
>   gather_facts: no
>   hosts: 127.0.0.1
>
>   tasks:
>
>- name: Copy JSON file to remote server
>   copy:
> dest: /apps/web/scripts/json
> src: /tmp/report.json
> remote_src: no
> owner: user
> group: group
> mode: 0644
>   delegate_to: remote_server
>   become_user: awx
>   become: no
>
>
>
>
>

-- 
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/993a7441-8ea0-4181-9e87-4bfb715876ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Installing WinRM offline

2018-11-19 Thread Kartik Jayaraman
Thank you sir.

I had actually done it and was still getting the error. I then realised i 
had to do sudo

sudo ansible web -i inventory.yml -m win_ping

10.xxx.xxx.xx | FAILED! =>SUCCESS => {
"changed": false,
"ping": "pong"
}

This is for anyone who wants to install WinRM offline. This is what you do.

1. Download pywinrm from web - https://pypi.org/project/pywinrm/#files - It 
has a tar file and the whl file. 
2. Using WinSCP or any other tool, push it to your linux box, into a 
directory say WinRM
3. Then go to the command line in linux and go to WinRM directory
4. Untar the tar.gz file using "tar -xvzf pywinrm-0.3.0.tar.gz"
5. cd pywinrm-0.3.0
6. sudo python setup.py install
7. This would fail on dependencies again, if you do not have an internet 
connection, so please go to pypi.org and search for the following packages 
and repeat the same install, you should eventually be good.
gssapi-1.5.0.tar.gz
MarkupSafe-1.1.0.tar.gz
python-ntlm3-1.0.2.tar.gz
python_ntlm3-1.0.2-py2.py3-none-any.whl
requests-2.9.1-py2.py3-none-any.whl
requests-2.9.1.tar.gz
requests-credssp-1.0.2.tar.gz
requests-kerberos-0.12.0.tar.gz
requests_credssp-1.0.2-py2.py3-none-any.whl
requests_kerberos-0.12.0-py2.py3-none-any.whl
requests_ntlm-0.3.0-py2.py3-none-any.whl
requests_ntlm-0.3.0.tar.gz
six-1.4.0.tar.gz
xmltodict-0.11.0-py2.py3-none-any.whl
xmltodict-0.11.0.tar.gz

Thanks!

On Friday, November 16, 2018 at 7:41:54 PM UTC-6, Dick Visser wrote:
>
>
>
> On Fri, 16 Nov 2018 at 23:45, Kartik Jayaraman  > wrote:
>
>> Hello,
>>
>> I have a Centos VM which is cut off from the internet. It does have 
>> Ansible installed but does not have pywinrm installed. It did not even have 
>> pip installed.
>>
>> So I installed pip offline, basically downloaded the tar.gz and copied to 
>> the VM using WinSCP. After which i installed using "python setup.py 
>> install" command
>>
>> I tried doing the same of pywinrm-0.3.0, but there are way too many 
>> dependencies for ntlm etc that the installation aborts, because it looks to 
>> go to the web and does not find.
>>
>> So right now i am stuck where my small little playbook throws this error. 
>> Please can someone assist? Thanks in advance
>>
>
> You will either have to repeat this for every dependency you come across, 
> or address your inability to access the internet.
> It depends on your local situation which option is the shortest path to 
> success.
>
> Dick 
> -- 
> Sent from a mobile device - please excuse the brevity, spelling and 
> punctuation.
>

-- 
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/d1b8968b-6778-4de9-ac45-f58930efea24%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible Inventory and http_proxy environment variables

2018-11-19 Thread Kai Stian Olstad
On Monday, 19 November 2018 18:41:46 CET Bruno Cochofel wrote:
> I have more then one DC, one with proxy and the other with no proxy. Almost 
> all my servers are on the DC that has proxy.
> Can I set something like (taken from ansible documentation):
> 
> ---# file: group_vars/boston
> ntp_server: ntp.bos.example.combackup: bak.bos.example.comproxy_env:
>   http_proxy: http://proxy.bos.example.com:8080
>   https_proxy: http://proxy.bos.example.com:8080
> 
> and use
> 
> environment: "{{proxy_env}}"
> 
> but for the other hosts undefined/unset the proxy_env and don't use the 
> "environment"?

I think this should work, in group_vars/all set proxy_env to empty dict so you 
don't get undefined variable.
proxy_env: {}

Then you can set proxy_env to a proper value in the group_vars or host_vars 
depending on your requirement.


-- 
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/3324947.aCTDG5Pn8n%40x1.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible Inventory and http_proxy environment variables

2018-11-19 Thread Bruno Cochofel
Hi,

I have more then one DC, one with proxy and the other with no proxy. Almost 
all my servers are on the DC that has proxy.
Can I set something like (taken from ansible documentation):

---# file: group_vars/boston
ntp_server: ntp.bos.example.combackup: bak.bos.example.comproxy_env:
  http_proxy: http://proxy.bos.example.com:8080
  https_proxy: http://proxy.bos.example.com:8080

and use

environment: "{{proxy_env}}"

but for the other hosts undefined/unset the proxy_env and don't use the 
"environment"?

-- 
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/ccb62d25-d09e-4cec-9661-20c771e33097%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_default_ipv4'"}

2018-11-19 Thread Kai Stian Olstad
On Monday, 19 November 2018 07:34:17 CET Tom K. wrote:
> ansible-playbook -i infra --limit mysql06 main.yml --tags "mysql" -v --check
> 
> fatal: [mysql06]: FAILED! => {"changed": false, "msg": 
> "AnsibleUndefinedVariable: 
> 'ansible.vars.hostvars.HostVarsVars object' has no attribute 
> 'ansible_default_ipv4'"}
> 
> But it seems to work opposite to the way described above (Apologies if I'm 
> misreading).  The error is thrown for ANY host that I use the *--limit* 
> flag on, not the ones that I don't use the limit on.  
> 
> I would have expected it to gather facts on the host I'm limiting the run 
> too, not the ones I'm excluding.  

Yes, it's only gathering facts on the host in the limit.

The error message isn't about that it can't find ansible_default_ipv4 on the 
host in the limit (mysql06), it's about mysql06 cant find ansible_default_ipv4 
for host mysql05.


-- 
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/4441790.OQkjQEKeQW%40x1.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] How to copy a file from localhost (Ansible Tower server) to remote host in Ansible playbook?

2018-11-19 Thread Saravanan
Hi Ansible Experts,
Need to copy a file from Ansible tower server to remote server using copy 
module. Can you please help to achieve this using copy module or any other 
module in Ansible?

---
- name: Copy file to remote server
  gather_facts: no
  hosts: 127.0.0.1

  tasks:

   - name: Copy JSON file to remote server
  copy:
dest: /apps/web/scripts/json
src: /tmp/report.json
remote_src: no
owner: user
group: group
mode: 0644
  delegate_to: remote_server
  become_user: awx
  become: no




-- 
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/fc22a4af-2341-4930-939d-5fa3df9b1187%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Template File Transfer

2018-11-19 Thread 'J Hawkesworth' via Ansible Project
Hmm, as I say I don't know what kitchen expects, however it strikes me as 
unusual to have your playbook stored in the tasks folder of your role.  
Generally playbooks list one or more roles that should be applied to the 
hosts in the current play, so it seems odd to have the playbook stored in 
with the role.

Can you try just using 'bare' ansible without it being wrapped in kitchen?

Might be worth running ansible-playbook with -v to get debugging 
information including the paths where it is looking for things.

Hope this helps,

Jon

On Monday, November 19, 2018 at 10:58:47 AM UTC, Ian Burrows wrote:
>
> Thanks, my directory structure is as follows:
>
> /
> .kitchen.yml
> roles/common/
> --/tasks/playbook.yml
> --/templates/create_motd.j2
> test/
>
> //.kitchen.yml
> ---
>   driver:
> name: vagrant
>
>   provisioner:
> name: ansible_playbook
> hosts: all
> require_ansible_repo: true
> require_chef_for_busser: false
> require_ruby_for_busser: false
> ansible_verbose: true
> ansible_verbosity: 3
> playbook: ../cloud_ansible/roles/common/tasks/playbook.yml
> roles_path: ../cloud_ansible/roles/common/
>
>   platforms:
> - name: ubuntu-16.04
>
>   verifier:
> name: inspec
>
>   suites:
> - name: cloud_computing
>
> //roles/common/tasks/playbook.yml
>
> - name: Add configurations for Ubuntu
>   hosts: all
>   roles:
> - common
>   vars:
> v1: 'test'
> group: ['sname1','sname2','sname3']
> v2: 'test2'
> change_me: 'change me'
> 
>   tasks:
> - name: Create Template for MOTD
>   template:
> src: create_motd.j2
> dest: /etc/motd
>
> //roles/common/templates/create_motd.j2
>
> {{v1}}
> {% for item in group[ %}
> {{item}}
> {% endfor %}
> {{v2}}
> Last tool-run was: {{ansible_date_time.date}}
> {{change_me}}
>
>
> On Monday, November 19, 2018 at 9:50:57 AM UTC+1, J Hawkesworth wrote:
>>
>> Hard to guess what's going on here without seeing your playbook and 
>> template file, but my guess would be the template (.j2) file isn't in one 
>> of the places that ansible expects to find it.
>>
>> If your template is in a role (best place for it) then there are some 
>> rules about where ansible will look for templates (and other files) 
>> described here:
>>
>> https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#using-roles
>>
>> I can't speak for 'kitchen' as I haven't used for it, but the `template` 
>> module should copy (templated) files to the destination that is specified - 
>> but if it can't find the template then it wont of course.
>>
>> Hope this helps,
>> Jon
>>
>>
>> On Monday, November 19, 2018 at 8:25:47 AM UTC, Ian Burrows wrote:
>>>
>>> Hi, I am very new to Ansible and I have a question regarding the 
>>> template module. 
>>>
>>> I am receiving an error running a playbook where ansible cannot find or 
>>> access the j2 file. 
>>>
>>> If I transfer the file manually into /tmp/kitchen/ where it says it is 
>>> looking, then it runs fine. I am using Test Kitchen with kitchen-ansible, 
>>> Vagrant and Inspec on Windows. Is the template file not supposed to be sent 
>>> to the host with kitchen? Maybe this is a Test Kitchen issue of not 
>>> generating the files on the target?
>>>
>>> Thank you for any guidance.
>>>
>>

-- 
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/5c968185-dcd8-4336-b294-889ab6146246%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Unarchive can't handle empty archive files

2018-11-19 Thread philippe . mxm
Hello,

When extracting an empty archive, the unarchive module exists with an 
error: 

*"failed: [localhost] (item=/tmp/foo/bar.zip) => {"changed": false, "item": 
"/tmp/foo/bar.zip", "msg": "Failed to find handler for 
\"/tmp/foo/bar.zip\". Make sure the required command to extract the file is 
installed. Command \"/bin/gtar\" could not handle archive. Command 
\"/bin/unzip\" could not handle archive."}"*

unzip exists with error code 1 and warning message "*warning 
[/tmp/foo/bar.zip]:  zipfile is empty*". 
Ansible just stops there with a strange error message (took me quite some 
time to discover the cause).

I tried to handle it with "failed_when" but it seems that you can't 
register the command result in a var.
The only way to prevent this I found is using "ignore_errors" which I don't 
want to use as I still want to stop if a "true" error happens. 

Is there a proper way to handle this case ? 
I know it's not really a bug as unzip still exists with a value >0 but I 
think there should be a in-application way to handle this.

ansible-playbook 2.6.4
python version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 
(Red Hat 4.8.5-28)]

Thank you in advance.

-- 
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/a5890b31-76e6-4f2e-a8af-87f3fca8c652%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] How to include/import yml files based on condition

2018-11-19 Thread Yerigeri
Hi 

Im a newbie on Ansible. I have a scenario where 

Steps:
I look for a version of an application.
If version is present call uninstall.yml else call install.yml

snippet i tried

 - win_shell: D:\Build\regread2.vbs XXX InstallLocation
register: result
  - set_fact:
  signup_token: '{{ result.stdout | regex_search(qry)| 
replace("[","")|replace("]","") }}'
vars:
  qry: '\[(.*?)\]'
  - debug: msg={{ signup_token }}
###
  - include_tasks: Uninstall.yml
when: '{{ signup_token }}'== ''

Please do help.

Regards
VY

-- 
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/6e8d5c27-e66c-421b-8ee2-7de283a38a90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Template File Transfer

2018-11-19 Thread Ian Burrows
Thanks, my directory structure is as follows:

/
.kitchen.yml
roles/common/
--/tasks/playbook.yml
--/templates/create_motd.j2
test/

//.kitchen.yml
---
  driver:
name: vagrant

  provisioner:
name: ansible_playbook
hosts: all
require_ansible_repo: true
require_chef_for_busser: false
require_ruby_for_busser: false
ansible_verbose: true
ansible_verbosity: 3
playbook: ../cloud_ansible/roles/common/tasks/playbook.yml
roles_path: ../cloud_ansible/roles/common/

  platforms:
- name: ubuntu-16.04

  verifier:
name: inspec

  suites:
- name: cloud_computing

//roles/common/tasks/playbook.yml

- name: Add configurations for Ubuntu
  hosts: all
  roles:
- common
  vars:
v1: 'test'
group: ['sname1','sname2','sname3']
v2: 'test2'
change_me: 'change me'

  tasks:
- name: Create Template for MOTD
  template:
src: create_motd.j2
dest: /etc/motd

//roles/common/templates/create_motd.j2

{{v1}}
{% for item in group[ %}
{{item}}
{% endfor %}
{{v2}}
Last tool-run was: {{ansible_date_time.date}}
{{change_me}}


On Monday, November 19, 2018 at 9:50:57 AM UTC+1, J Hawkesworth wrote:
>
> Hard to guess what's going on here without seeing your playbook and 
> template file, but my guess would be the template (.j2) file isn't in one 
> of the places that ansible expects to find it.
>
> If your template is in a role (best place for it) then there are some 
> rules about where ansible will look for templates (and other files) 
> described here:
>
> https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#using-roles
>
> I can't speak for 'kitchen' as I haven't used for it, but the `template` 
> module should copy (templated) files to the destination that is specified - 
> but if it can't find the template then it wont of course.
>
> Hope this helps,
> Jon
>
>
> On Monday, November 19, 2018 at 8:25:47 AM UTC, Ian Burrows wrote:
>>
>> Hi, I am very new to Ansible and I have a question regarding the template 
>> module. 
>>
>> I am receiving an error running a playbook where ansible cannot find or 
>> access the j2 file. 
>>
>> If I transfer the file manually into /tmp/kitchen/ where it says it is 
>> looking, then it runs fine. I am using Test Kitchen with kitchen-ansible, 
>> Vagrant and Inspec on Windows. Is the template file not supposed to be sent 
>> to the host with kitchen? Maybe this is a Test Kitchen issue of not 
>> generating the files on the target?
>>
>> Thank you for any guidance.
>>
>

-- 
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/fc85ddbf-22b1-4bae-973c-f0e7ce569df8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: ERROR awx.main.utils Publish Exception: ZMQError('Operation cannot be accomplished in current state')

2018-11-19 Thread sgocloudtech
Hello,
I am experiancing the same issue on Redhat 6.X and Tower version 3.0.4.
There are no hints or leads when I search in Google.

Did you manage to resolve the issue? How did you do it? Any Leads/Clues??

On Tuesday, 2 August 2016 15:12:39 UTC+2, Arun John Varughese wrote:
>
>
> Hi,
> I am currently testing Ansible Tower using a trial license.
>
> And, I get the following error: 
>
> Live events: error connecting to Tower server in the UI after hovering 
> the mouse pointer over the red dot at the top right section in the 
> interface.
>
>
> Also I get to see the following error from the /var/log/tower/tower.log 
> file
>
>
> 2016-08-02 05:12:02,616 ERROR awx.main.utils Publish Exception: 
> ZMQError('Operation cannot be accomplished in current state'); retry=3 
> Traceback (most recent call last): 
> File "/lib/python2.7/site-packages/awx/main/socket.py", line 136, in 
> publish 
> File 
> "/var/lib/awx/venv/tower/lib/python2.7/site-packages/zmq/sugar/socket.py", 
> line 399, in send_json 
> return self.send(msg, flags) 
> File "zmq/backend/cython/socket.pyx", line 574, in 
> zmq.backend.cython.socket.Socket.send (zmq/backend/cython/socket.c:5434) 
> File "zmq/backend/cython/socket.pyx", line 621, in 
> zmq.backend.cython.socket.Socket.send (zmq/backend/cython/socket.c:5196) 
> File "zmq/backend/cython/socket.pyx", line 181, in 
> zmq.backend.cython.socket._send_copy (zmq/backend/cython/socket.c:2035) 
> File "zmq/backend/cython/checkrc.pxd", line 21, in 
> zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:6248) 
> raise ZMQError(errno) 
> ZMQError: Operation cannot be accomplished in current state
>
>
> port 8080  has already been opened for this server.
>
>
> Any idea what could be the issue ?
>
>
> Regards,
>
> AJV
>

-- 
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/1d0a76cc-c010-4451-ac11-17729c2de64c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] ansible-pull minimal standalone version

2018-11-19 Thread Christian Frieß
Thanks, I noticed this when I crawled through the source code over the 
weekend.
Interesting, that it's just symlinks..

I'm looking to trim modules but all the time I find more directories where 
modules or configuration files for modules are stored.
I found this at at least 3 places and it seems like a lot of trouble to 
remove modules I don't need since sometimes I can just delete whole 
directories and then again there are directories where all modules have one 
file each inside the directory and I need to go through all of them.

Now, what happens if I miss removing all files of a module? Will this 
produce an error or will I just not be able to use that module?

Am Freitag, 16. November 2018 18:22:32 UTC+1 schrieb Brian Coca:
>
> ansible-pull uses ansbile and ansible-playbook under the hood, so the 
> ansible package IS the minmal package available 
>
> you might want to trim modules/plugins you don't use but that depends 
> on the plays being executed. 
>
>
>
> -- 
> -- 
> Brian Coca 
>

-- 
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/e09b6ddd-05c1-45f7-aa0c-e5bea0954589%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Template File Transfer

2018-11-19 Thread 'J Hawkesworth' via Ansible Project
Hard to guess what's going on here without seeing your playbook and 
template file, but my guess would be the template (.j2) file isn't in one 
of the places that ansible expects to find it.

If your template is in a role (best place for it) then there are some rules 
about where ansible will look for templates (and other files) described 
here:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#using-roles

I can't speak for 'kitchen' as I haven't used for it, but the `template` 
module should copy (templated) files to the destination that is specified - 
but if it can't find the template then it wont of course.

Hope this helps,
Jon


On Monday, November 19, 2018 at 8:25:47 AM UTC, Ian Burrows wrote:
>
> Hi, I am very new to Ansible and I have a question regarding the template 
> module. 
>
> I am receiving an error running a playbook where ansible cannot find or 
> access the j2 file. 
>
> If I transfer the file manually into /tmp/kitchen/ where it says it is 
> looking, then it runs fine. I am using Test Kitchen with kitchen-ansible, 
> Vagrant and Inspec on Windows. Is the template file not supposed to be sent 
> to the host with kitchen? Maybe this is a Test Kitchen issue of not 
> generating the files on the target?
>
> Thank you for any guidance.
>

-- 
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/290ca6d1-1f10-4364-b128-8a0d5435ff3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Template File Transfer

2018-11-19 Thread Ian Burrows
Hi, I am very new to Ansible and I have a question regarding the template 
module. 

I am receiving an error running a playbook where ansible cannot find or 
access the j2 file. 

If I transfer the file manually into /tmp/kitchen/ where it says it is 
looking, then it runs fine. I am using Test Kitchen with kitchen-ansible, 
Vagrant and Inspec on Windows. Is the template file not supposed to be sent 
to the host with kitchen? Maybe this is a Test Kitchen issue of not 
generating the files on the target?

Thank you for any guidance.

-- 
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/f8420310-45ee-45c6-bfe2-183a92731f87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.