[ansible-project] Re: SSL/Certificate errors when running playbooks against Azure

2018-08-21 Thread Mahaboob Basha
Hi, I am getting the same exception now. Can you please help me, how you 
have fixed this issue. 

On Tuesday, 12 December 2017 13:03:40 UTC-8, JOS wrote:
>
> Hello,
>
> So I have an Azure free trial subscription and am trying to deploy VMs for 
> it through ansible.  For reference, I mostly followed this guide: 
> https://github.com/erjosito/ansible-azure-lab
>
> I am unable to execute any playbook task at all, even something as simple 
> as merely creating a resource group with a network.  Here is the error I 
> always get:
>
> fatal: [192.168.0.177]: FAILED! => {"changed": false, "failed": true, 
> "module_stderr": "From cffi callback  0x318b9b0>:\nTraceback (most recent call last):\n  File 
> \"/usr/lib/python2.7/site-packages/OpenSSL/SSL.py\", line 313, in 
> wrapper\n_lib.X509_up_ref(x509)\nAttributeError: 'module' object has no 
> attribute 'X509_up_ref'\nTraceback (most recent call last):\n  File 
> \"/tmp/ansible_uaTUwO/ansible_module_azure_rm_virtualnetwork.py\", line 
> 354, in \nmain()\n  File 
> \"/tmp/ansible_uaTUwO/ansible_module_azure_rm_virtualnetwork.py\", line 
> 351, in main\nAzureRMVirtualNetwork()\n  File 
> \"/tmp/ansible_uaTUwO/ansible_module_azure_rm_virtualnetwork.py\", line 
> 206, in __init__\nsupports_check_mode=True)\n  File 
> \"/tmp/ansible_uaTUwO/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py\",
>  
> line 235, in __init__\n  File 
> \"/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py\", 
> line 440, in __init__\nself.set_token()\n  File 
> \"/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py\", 
> line 473, in set_token\nraise_with_traceback(AuthenticationError, \"\", 
> err)\n  File \"/usr/lib/python2.7/site-packages/msrest/exceptions.py\", 
> line 48, in raise_with_traceback\nraise 
> error\nmsrest.exceptions.AuthenticationError: , SSLError: 
> HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max 
> retries exceeded with url: /*b4f64759-blah-blah*/oauth2/token (Caused by 
> SSLError(SSLError(\"bad handshake: Error([('SSL routines', 
> 'ssl3_get_server_certificate', 'certificate verify failed')],)\",),))\n", 
> "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}
>
>
> I am able to connect to azure via the azure CLI create VMs and such 
> through a bash script, but I need to get this working with ansible.
>
>
> My credentials file
>
> subscription_id=5eff-blah-blah
> client_id=83e09b01-blah-blah
> secret=passwordblahblah
> tenant=b4f64759-blah-blah
>
>
>
> Sample yml
>
> - name: whatever
>   hosts: localhost
>   connection: local
>
>   tasks:
>   - name: Create virtual network
> azure_rm_virtualnetwork:
>   resource_group: myResourceGroup
>   name: myVnet
>   address_prefixes: "10.10.0.0/16"
>
> I have even tried modifying my credentials file to include the azure AD 
> username & password (yes, I know this is considered bad practice, but I got 
> desperate) and it still fails with a certificate error:
>
> ad_user=du...@dummy.com 
> password=DummyLab
> subscription_id=5eff-blah-blah
>
> fatal: [192.168.0.177]: FAILED! => {"changed": false, "failed": true, 
> "module_stderr": "From cffi callback  0x30f3938>:\nTraceback (most recent call last):\n  File 
> \"/usr/lib/python2.7/site-packages/OpenSSL/SSL.py\", line 313, in 
> wrapper\n_lib.X509_up_ref(x509)\nAttributeError: 'module' object has no 
> attribute 'X509_up_ref'\nTraceback (most recent call last):\n  File 
> \"/tmp/ansible_B6bKF3/ansible_module_azure_rm_virtualnetwork.py\", line 
> 354, in \nmain()\n  File 
> \"/tmp/ansible_B6bKF3/ansible_module_azure_rm_virtualnetwork.py\", line 
> 351, in main\nAzureRMVirtualNetwork()\n  File 
> \"/tmp/ansible_B6bKF3/ansible_module_azure_rm_virtualnetwork.py\", line 
> 206, in __init__\nsupports_check_mode=True)\n  File 
> \"/tmp/ansible_B6bKF3/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py\",
>  
> line 245, in __init__\n  File 
> \"/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py\", 
> line 367, in __init__\nself.set_token()\n  File 
> \"/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py\", 
> line 404, in set_token\nraise_with_traceback(AuthenticationError, \"\", 
> err)\n  File \"/usr/lib/python2.7/site-packages/msrest/exceptions.py\", 
> line 48, in raise_with_traceback\nraise 
> error\nmsrest.exceptions.AuthenticationError: , SSLError: 
> HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max 
> retries exceeded with url: /common/oauth2/token (Caused by 
> SSLError(SSLError(\"bad handshake: Error([('SSL routines', 
> 'ssl3_get_server_certificate', 'certificate verify failed')],)\",),))\n", 
> "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}
>
>

-- 
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...@googl

Re: [ansible-project] Access Splunk alerts through ansible

2018-08-21 Thread Jonathan Lozada De La Matta
or better if splunk can do curl/api calls to tower then that's a better
option.

On Wed, Aug 22, 2018 at 1:23 AM Pradeep Drall 
wrote:

> Hi,
> Thanks for your email.
>
> We have created number of alerts in Splunk for our project environment
> (dev, uat, production), now we would like to call these alerts through
> ansible / ansible tower. Because we have limited access in splunk and wants
> to execute / check the alert result. Is there a way to access these alerts
> via ansible command or ansible tower.
>
> Thanks & regards,
> Pradeep Kumar Drall
> 919711940167
> skype - pradeep.kumar2607
>
>
> On Mon, Aug 20, 2018 at 10:09 PM Jonathan Lozada De La Matta <
> jloza...@redhat.com> wrote:
>
>> can you describe more what are you trying to do with those alerts? you
>> need to go into more detail in what you are trying to do.
>>
>> On Mon, Aug 20, 2018 at 12:37 PM Pradeep Drall 
>> wrote:
>>
>>> I would like to access Splunk alerts through ansible. We have several
>>> alerts in Splunk which we wants to access through ansible. Please do let me
>>> know can we access splunk alerts via ansible. If so, let me know the steps.
>>>
>>>
>>>
>>> --
>>> 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/bdf57008-8a33-4f07-97f4-16c46d239d88%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>>
>> Jonathan lozada de la matta
>>
>> AUTOMATION CONSULTANT - AUTOMATION PRACTICE
>>
>> Red Hat Consulting Services 
>>
>> jloza...@redhat.com
>>
>>
>>
>>
>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to 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%2BJ4-P2roOMQEBSa394C5RYsYvRLUfms%3DXr0H4N%2B2qtVfg%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --

Jonathan lozada de la matta

AUTOMATION CONSULTANT - AUTOMATION PRACTICE

Red Hat Consulting Services 

jloza...@redhat.com

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 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%2BJ7ffd5xgCMuvW5P2K8nWFzxX%2BFoNbqb%2BKAJiwR1rLRPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Access Splunk alerts through ansible

2018-08-21 Thread Jonathan Lozada De La Matta
you might be able to use the uri modules and conditionals but, I haven't
tried it with splunk.

On Wed, Aug 22, 2018 at 1:23 AM Pradeep Drall 
wrote:

> Hi,
> Thanks for your email.
>
> We have created number of alerts in Splunk for our project environment
> (dev, uat, production), now we would like to call these alerts through
> ansible / ansible tower. Because we have limited access in splunk and wants
> to execute / check the alert result. Is there a way to access these alerts
> via ansible command or ansible tower.
>
> Thanks & regards,
> Pradeep Kumar Drall
> 919711940167
> skype - pradeep.kumar2607
>
>
> On Mon, Aug 20, 2018 at 10:09 PM Jonathan Lozada De La Matta <
> jloza...@redhat.com> wrote:
>
>> can you describe more what are you trying to do with those alerts? you
>> need to go into more detail in what you are trying to do.
>>
>> On Mon, Aug 20, 2018 at 12:37 PM Pradeep Drall 
>> wrote:
>>
>>> I would like to access Splunk alerts through ansible. We have several
>>> alerts in Splunk which we wants to access through ansible. Please do let me
>>> know can we access splunk alerts via ansible. If so, let me know the steps.
>>>
>>>
>>>
>>> --
>>> 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/bdf57008-8a33-4f07-97f4-16c46d239d88%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>>
>> Jonathan lozada de la matta
>>
>> AUTOMATION CONSULTANT - AUTOMATION PRACTICE
>>
>> Red Hat Consulting Services 
>>
>> jloza...@redhat.com
>>
>>
>>
>>
>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to 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%2BJ4-P2roOMQEBSa394C5RYsYvRLUfms%3DXr0H4N%2B2qtVfg%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --

Jonathan lozada de la matta

AUTOMATION CONSULTANT - AUTOMATION PRACTICE

Red Hat Consulting Services 

jloza...@redhat.com

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 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%2BJOJgNj9W-HEJ2%2B5UzGou%3D5MxjH4UUB%3Dc7DmGBTTqCnwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Access Splunk alerts through ansible

2018-08-21 Thread Pradeep Drall
Hi,
Thanks for your email.

We have created number of alerts in Splunk for our project environment
(dev, uat, production), now we would like to call these alerts through
ansible / ansible tower. Because we have limited access in splunk and wants
to execute / check the alert result. Is there a way to access these alerts
via ansible command or ansible tower.

Thanks & regards,
Pradeep Kumar Drall
919711940167
skype - pradeep.kumar2607


On Mon, Aug 20, 2018 at 10:09 PM Jonathan Lozada De La Matta <
jloza...@redhat.com> wrote:

> can you describe more what are you trying to do with those alerts? you
> need to go into more detail in what you are trying to do.
>
> On Mon, Aug 20, 2018 at 12:37 PM Pradeep Drall 
> wrote:
>
>> I would like to access Splunk alerts through ansible. We have several
>> alerts in Splunk which we wants to access through ansible. Please do let me
>> know can we access splunk alerts via ansible. If so, let me know the steps.
>>
>>
>>
>> --
>> 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/bdf57008-8a33-4f07-97f4-16c46d239d88%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
> Jonathan lozada de la matta
>
> AUTOMATION CONSULTANT - AUTOMATION PRACTICE
>
> Red Hat Consulting Services 
>
> jloza...@redhat.com
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 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%2BJ4-P2roOMQEBSa394C5RYsYvRLUfms%3DXr0H4N%2B2qtVfg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+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/CAJv_HQX75QqfYB6ow8uj%3DkBvMHFAkr9crv_aWxcpJkYo8-87RA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Jenkins - Ansible integration

2018-08-21 Thread Vamsi Krishna
HI All,

Thanks for your suggestion.

I am able to resolve this issue. I have installed publish over ssh plugin 
from which I am able to run ansible playbook directly

PS:- My Jenkins and Ansible are on same server

Regards 
Vamsi

On Tuesday, August 21, 2018 at 12:04:33 AM UTC+5:30, Malcolm 
Hussain-Gambles wrote:
>
> If you are using Jenkins & ansible it's better to store the 
> playbooks/roles/inventories in git and use Jenkins to check it out. Makes 
> developing easier imho

-- 
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/bb75e88b-5217-44b5-bbd9-004aee78d9f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] location of `group_vars/` for included playbooks changed in 2.4+ ?

2018-08-21 Thread Riccardo Murri
Thank you very much for your reply, Matt -- indeed this was rather clearly 
documented in the 2.4 porting guide...

Effectively, you want to make sure your group_vars is relative to your 
> inventory file, and not your playbook file.
>
> Won't be possible in my case (inventory is generated and placed in a temp 
directory, whereas group vars are effectively parts of the playbooks); I'll 
see whether it's better to maintain symlinks or switch to explicitly 
loading with `vars_files:` 

Thanks,
Riccardo

-- 
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/ee7e7007-ed93-4aee-8864-5592ecf8d7a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] which tags are being used in runtime?

2018-08-21 Thread Brian Coca
ansible_run_tags


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


Re: [ansible-project] template module thinks validation succeeded when it should have failed.

2018-08-21 Thread David Reagan
Well, I think there were quite a few issues in my role that manifested in 
the template validation not working correctly. With fresh eyes, and 
inspired to think things through better, I was able to get it fixed. I 
hope. 

So, thanks!

To anyone experiencing something similar, double check your conditionals. 
If you have a main conf file that includes other templated conf files from 
elsewhere on the system, make sure your main file is really pulling in 
those files, and that the main file gets changed so that the validation 
command is triggered.


- David

On Monday, August 20, 2018 at 9:01:41 PM UTC-7, Dick Visser wrote:
>
> The template module does the validation using the *new* configuration file.
> This takes places *before* the file is put into its final place, so it’s 
> specifically *not* /etc/apache2/apache2.conf, but rather a temporary file.
> The location of this tempfile is part of the registered results:
>
> TASK [Gathering Facts] 
> 
> ok: [bionic]
>
> TASK [test template module] 
> ***
> changed: [bionic]
>
> TASK [debug] 
> **
> ok: [bionic] => {
> "results": {
> "changed": true, 
> "checksum": "9ef49cb61d96783deb22dd7ba23f42d48303a840", 
> "dest": "/etc/apache2/apache2.conf", 
> "diff": [], 
> "failed": false, 
> "gid": 0, 
> "group": "root", 
> "md5sum": "04f23d5d3f10c6f65eb3ec754d4ce73c", 
> "mode": "0644", 
> "owner": "root", 
> "size": 7250, 
> "src": 
> "/home/vagrant/.ansible/tmp/ansible-tmp-1534823379.24-1117512573422/source", 
> "state": "file", 
> "uid": 0
> }
> }
>
> PLAY RECAP 
> 
> bionic : ok=3changed=1unreachable=0
> failed=0   
>
>
>
> From you question it's not clear whether you manually ran 'apache2 -t -f 
> /etc/apache2/apache2.conf' on the target host *after* the template module 
> has run, or before that?
> And it's also not clear if the template module changed something when "thinks 
> it's just fine".
>
> Either way, debugging output (-v) should reveal more.
>
>
> Dick
>
>
> On Tue, 21 Aug 2018 at 00:35, David Reagan > 
> wrote:
>
>> Can anyone clarify how the validate option of the template module works? 
>> I have deliberately configured apache with invalid configuration. On the 
>> command line `apache2 -t -f /etc/apache2/apache2.conf` fails with a syntax 
>> error. But the template module, configured with `validate: 'apache2 -t -f 
>> %s'` thinks it's just fine.
>>
>> Also, what kind of results should be registered in a register variable 
>> for a failed validation?
>>
>> I'm using ansible 2.4.4.0 on Ubuntu 18.04.
>>
>> My task:
>>
>> - name: "TestingConfig - Debian Family - Template main apache configuration 
>> file."
>>   when: ansible_os_family == 'Debian'
>>   template:
>> dest: "{{ aspects_apache24_test_configuration_root }}/apache2.conf"
>> src: "main.conf.j2"
>> owner: "root"
>> group: "root"
>> mode: "0640"
>> validate: 'apache2 -t -f %s'
>>   register: inprocess_validation_result
>>   tags:
>> - aspects_apache24
>> - aspects_apache24_configuration
>> - aspects_apache24_config
>>
>> -- 
>> 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/e47d44ef-32ec-49fd-9648-936ffb0328da%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+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/693baf46-6f3c-457a-9b0c-38960feef0aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] azure fileservices in ansible 2.6

2018-08-21 Thread Alexei Vasiliev
Hi,

Can someone say if it is possible to create an azure file share (azure 
storage/files) via new Ansible 2.6
There was mentioned that it can deploy various resources via REST APi, but 
no examples about shares.
Does anyone has such an experience?

-- 
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/119c81ed-1985-4358-8154-1eb2ae7a2ef6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: docker connection over remote host tcp no tls

2018-08-21 Thread dmartin
I think your host B has SSL or TLS running on port 2375 OR ansible is 
trying to use TLS when the thing running on port 2375 isn't.

On Monday, November 20, 2017 at 12:09:47 AM UTC-8, Esteban Mirizio wrote:
>
> Hi everyone! 
>
> I'm Having a hard time trying to a remote docker connection over non tls. 
> What I'm trying to achieve is to execute an ansible playbook inside a 
> docker located in host A to another docker located in host B, FYI network 
> mode is set to *"host" *on both docker hosts.
>
> This is the playbook I'm trying to execute:
>
>
> - hosts: localhost
>   tasks:
>   - name: add container to inventory
> add_host:
>   name: git-slave
>   ansible_connection: docker
>   ansible_docker_extra_args: "-H=tcp://192.168.255.2:2375"
>   ansible_user: root
> changed_when: false
>   - name: Test gitblit
> delegate_to: git-slave
> raw: cat /var/log/gitblit
>
>
> This is the error I'm getting:
>
> fatal: [localhost]: UNREACHABLE! => {
> "changed": false,
> "msg": "Authentication or permission failure. In some cases, you may 
> have been able to authenticate and did not have permissions on the target 
> directory. Consider changing the remote temp path in ansible.cfg to a path 
> rooted in \"/tmp\". Failed command was: ( umask 77 && mkdir -p \"` echo 
> ~/.ansible/tmp/ansible-tmp-1511161385.72-174791577619947 `\" && echo 
> ansible-tmp-1511161385.72-174791577619947=\"` echo 
> ~/.ansible/tmp/ansible-tmp-1511161385.72-174791577619947 `\" ), exited with 
> result 1, stderr output: tls: oversized record received with length 
> 20527\n",
> "unreachable": true
> }
>
> Here some test I did:
>
>
>1. Ping from Host A to Host B
>
>root@integration-centralothers0:/home/ubuntu# ping -c3 192.168.255.2
>PING 192.168.255.2 (192.168.255.2) 56(84) bytes of data.
>64 bytes from 192.168.255.2: icmp_seq=1 ttl=63 time=2.44 ms
>64 bytes from 192.168.255.2: icmp_seq=2 ttl=63 time=2.17 ms
>64 bytes from 192.168.255.2: icmp_seq=3 ttl=63 time=1.66 ms
>
>--- 192.168.255.2 ping statistics ---
>3 packets transmitted, 3 received, 0% packet loss, time 2003ms
>rtt min/avg/max/mdev = 1.662/2.094/2.447/0.329 ms
>
>
>2. Telnet from Host A to Host B against docker remote API:
>root@integration-centralothers0:/home/ubuntu# telnet 192.168.255.2 2375
>Trying 192.168.255.2...
>Connected to 192.168.255.2.
>Escape character is '^]'.
>
>HTTP/1.1 400 Bad Request
>Content-Type: text/plain; charset=utf-8
>Connection: close
>
>400 Bad RequestConnection closed by foreign host.
>
>3. Remote Docker API test from Host A to Host B using curl
>curl -s -XGET http://192.168.255.2:2375/v1.24/images/json
>
>--Response--
>
>
> [{"Containers":-1,"Created":1510250403,"Id":"sha256:20233e267b88092164b554dcf2c7803d2c1eca109fa9224387e02df38e4c915d","Labels":{"com.ansible.container.fingerprint":"f6577dc923ef7ca2954ee10ef99b01f17e953bd26feef91b6ed4609fbd2af7cc"},"ParentId":"","RepoDigests":["
>
> registry.rando.b-yond.com:5000/rando/rando-git-slave@sha256:f5b16936de627ad526042d40a695653b79c1ff0031bd0a9cae09a75e10d1008d
>"],
>
>
>4. Execution of ansible playbook using local docker connection from 
>inside HOST B to the target docker
>
>ansible all -i rando_git-slave_1, - -c docker -u root -m command 
>-a "cat /var/log/gitblit.log"
>ansible 2.4.1.0
>  config file = /etc/ansible/ansible.cfg
>  configured module search path = [u'/root/.ansible/plugins/modules', 
>u'/usr/share/ansible/plugins/modules']
>  ansible python module location = 
>/usr/lib/python2.7/dist-packages/ansible
>  executable location = /usr/bin/ansible
>  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 
>20160609]
>Using /etc/ansible/ansible.cfg as config file
>setting up inventory plugins
>Parsed rando_git-slave_1, inventory source with host_list plugin
>Loading callback plugin minimal of type stdout, v2.0 from 
>/usr/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc
>META: ran handlers
>Using module file 
>/usr/lib/python2.7/dist-packages/ansible/modules/commands/command.py
> ESTABLISH DOCKER CONNECTION FOR USER: root
> EXEC ['/usr/bin/docker', 'exec', '-u', u'root', 
>'-i', u'rando_git-slave_1', u'/bin/sh', '-c', u"/bin/sh -c 'echo ~ && 
> sleep 
>0'"]
> EXEC ['/usr/bin/docker', 'exec', '-u', u'root', 
>'-i', u'rando_git-slave_1', u'/bin/sh', '-c', u'/bin/sh -c \'( umask 77 && 
>mkdir -p "` echo 
>/root/.ansible/tmp/ansible-tmp-1511165208.65-101293422432691 `" && echo 
>ansible-tmp-1511165208.65-101293422432691="` echo 
>/root/.ansible/tmp/ansible-tmp-1511165208.65-101293422432691 `" ) && sleep 
>0\'']
> PUT /tmp/tmpYGG6kk TO 
>/root/.ansible/tmp/ansible-tmp-1511165208.65-101293422432691/command.py
> EXEC ['/usr/bin/docker', 'exe

[ansible-project] Re: how to use an pipe like < < in ansible ?

2018-08-21 Thread dmartin
Use the shell module.

On Tuesday, August 21, 2018 at 10:45:44 AM UTC-7, Henrik Schuetze wrote:
>
> i want to use a command like:
>
> read CURRENT_LOG CURRENT_POS < <( mysql -BNe "SHOW MASTER STATUS"); echo 
> CURRENT_LOG=$CURRENT_LOG CURRENT_POS=$CURRENT_POS 
> (credits: 
> https://dba.stackexchange.com/questions/34934/how-to-retrieve-master-log-position-and-master-log-file-in-shell-script
> )
>
> But ansible dont unterstand "< <"
>
> What can i do ?
>
>

-- 
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/0fa42bb0-6ed7-41b2-bceb-52f3e11d7081%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] how to use an pipe like < < in ansible ?

2018-08-21 Thread Henrik Schuetze
i want to use a command like:

read CURRENT_LOG CURRENT_POS < <( mysql -BNe "SHOW MASTER STATUS"); echo 
CURRENT_LOG=$CURRENT_LOG CURRENT_POS=$CURRENT_POS 
(credits: 
https://dba.stackexchange.com/questions/34934/how-to-retrieve-master-log-position-and-master-log-file-in-shell-script)

But ansible dont unterstand "< <"

What can i do ?

-- 
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/28ebef50-99b2-4872-b9ab-7e423af52b28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Solution for add keys mutual

2018-08-21 Thread Henrik Schuetze
I found a solution:

In my inventory files i put the remote IP and the remote ssh key.
In my task main.yml i use:

- name:  copy the ssh key
  authorized_key:
   user: root
   state: present
   key: "{{ remote_key }}"

that solve my problem. 

Thanx for the help

Am Dienstag, 21. August 2018 15:29:00 UTC+2 schrieb Jonathan Lozada De La 
Matta:
>
> Do one host first then the other if you are doing this manually. If you 
> are trying to use ansible to exactly do this steps then use the user module 
> and authorized_key
>
> On Tue, Aug 21, 2018 at 9:24 AM Henrik Schuetze  > wrote:
>
>> the syntax for ssh-copy-id is: ssh-copy-id -i ~/.ssh/mykey user@host
>>
>> And i want:   from Host1 to Host2
>>   and from host2 to host1
>>
>> I don't know how to specify the other host in a such a scenario
>>
>>
>>
>> Am Dienstag, 21. August 2018 15:15:29 UTC+2 schrieb Jonathan Lozada De La 
>> Matta:
>>>
>>> what do you mean? hard code what exactly?
>>>
>>> On Tue, Aug 21, 2018 at 9:13 AM Henrik Schuetze  
>>> wrote:
>>>
 thanx. but i need to address the other host. And i dont want to hard 
 code the ip adress in this task




 Am Dienstag, 21. August 2018 14:39:30 UTC+2 schrieb Henrik Schuetze:
>
> Hi,
>
> i want to enable ssh between two linux hosts.
> i generate the ssh key on both hosts.
> and then i need to add the keys on the other servers respectively
>
> Does anyone has a ready solution for that?
>
>
> greetings
> Henrik
>
 -- 
 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/210cb9fc-9e1c-4883-9b1f-6c0f63e90931%40googlegroups.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>> -- 
>>>
>>> Jonathan lozada de la matta
>>>
>>> AUTOMATION CONSULTANT - AUTOMATION PRACTICE
>>>
>>> Red Hat Consulting Services 
>>>
>>> jloz...@redhat.com
>>>
>>>
>>>  
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to 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/9c6a2a11-0998-4be8-98e4-387040089eaf%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
>
> Jonathan lozada de la matta
>
> AUTOMATION CONSULTANT - AUTOMATION PRACTICE
>
> Red Hat Consulting Services 
>
> jloz...@redhat.com 
>
>
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 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/724ac15b-ed82-41fc-aeaa-874f11b85b8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] ansible on docker installation

2018-08-21 Thread Dick Visser
You haven't stated what you are trying to achieve, so I'll assume you
want to run an ansible control machine from a container.
If this is the case, then https://hub.docker.com/r/ansible/ansible/
lists your issue:

"Images for automated testing of Ansible. They do not include Ansible
and are not for end users."

Check out 
https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-the-control-machine
as well.

Dick





On 21 August 2018 at 13:37, nbctcp  wrote:
> Hi,
>
> I am trying to install ansible on docker on Ubuntu Desktop 18.04LTS
>
> PROBLEMS:
> 1. error when try to docker run
> 2. whether docker hub ansible/ansible already has ssh client/server inside
> it
> If doesn't then how to install ssh inside container
>
> What steps I miss
> tq
>
> STEPS
> Docker
> # apt-get update
> # apt-get install apt-transport-https ca-certificates curl
> software-properties-common
> # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
> -
> Verify that you now have the key with the fingerprint9DC8 5822 9FC7 DD38
> 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the
> fingerprint.
> # apt-key fingerprint 0EBFCD88
> pub   4096R/0EBFCD88 2017-02-22
>   Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
> uid  Docker Release (CE deb) 
> sub   4096R/F273FCD8 2017-02-22
> # add-apt-repository "deb [arch=amd64]
> https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
> # apt-get update
> # apt-get install docker-ce
>
> -add your current user to docker group
> admin2$ sudo usermod -aG docker $USER
> # systemctl enable docker && systemctl start docker
>
>
> Ansible
> # docker pull ansible/ansible:default
> # docker run --rm -it 13030821a080
> Failed to determine whether /sys is a mount point: Operation not permitted
> Failed to determine whether /proc is a mount point: Operation not permitted
> Failed to determine whether /dev is a mount point: Operation not permitted
> Failed to determine whether /dev/shm is a mount point: Operation not
> permitted
> Failed to determine whether /run is a mount point: Operation not permitted
> Failed to determine whether /run/lock is a mount point: Operation not
> permitted
> Failed to determine whether /sys/fs/cgroup is a mount point: Operation not
> permitted
> Failed to determine whether /sys/fs/cgroup/systemd is a mount point:
> Operation not permitted
> [!!] Failed to mount API filesystems, freezing.
> Freezing execution.
>
> --
> 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/9e97d4c5-618e-4fc4-9a8d-f64360ca2c1b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
T: +31205304488
PGP key fingerprint: F575 58C6 62C6 FD5B A9CD 217C 2667 13D4 E6EF 488D
GÉANT Vereniging (Association) is registered with the Chamber of
Commerce in Amsterdam with registration number 40535155 and operates
in the UK as a branch of GÉANT Vereniging. Registered office:
Hoekenrode 3, 1102 BR Amsterdam, The Netherlands. UK branch address:
City House, 126-130 Hills Road, Cambridge CB2 1PQ, UK.

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


[ansible-project] Re: Ansible set_fact sets fact even when another fact is undefined?

2018-08-21 Thread Ford FasteRR
Thanks for the update and clarification on this !!! 




On Tuesday, August 21, 2018 at 11:05:15 AM UTC-4, Ford FasteRR wrote:
>
>
> 0down votefavorite 
> 
>
> I'm seeing strange behavior in ansible 2.5.5 (on centos 6.10)
>
> `facts_help.yml
> ---
> - debug:
> var: fake_fact
> - debug:
> var: new_fact
>
> - set_fact:
> new_fact: fake_fact
> when: fake_fact is defined
>
> - debug:
> var: fake_fact
> - debug:
> var: new_fact`
>
> I see this output:
>
> PLAY [localhost] 
> *
>
> TASK [Gathering Facts] 
> ***
> ok: [localhost]
>
> TASK [include_tasks] 
> *
> included: /etc/ansible/facts_help.yml for localhost
>
> TASK [debug] 
> *
> ok: [localhost] => {
> "fake_fact": "VARIABLE IS NOT DEFINED!"
> }
>
> TASK [debug] 
> *
> ok: [localhost] => {
> "new_fact": "VARIABLE IS NOT DEFINED!"
> }
>
> TASK [set_fact] 
> **
> ok: [localhost]
>
> TASK [debug] 
> *
> ok: [localhost] => {
> "fake_fact": "VARIABLE IS NOT DEFINED!"
> }
>
> TASK [debug] 
> *
> ok: [localhost] => {
> "new_fact": "fake_fact"
> }
>
> PLAY RECAP 
> ***
> localhost  : ok=7changed=0unreachable=0failed=0
>
> As you can see, fake_fact is undefined, and debug validates that. The 
> when: clause evaluates to true, and allows new_fact to be set (that's my 
> problem)..
>
> Afterwards, a repeat of the debug on fake_fact still appears undefined.
>
> So I'm not sure if this really a feature that I don't understand, a bug, 
> or just a user 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/ec95156d-701e-41f6-b0d3-ff0ac95aebc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible set_fact sets fact even when another fact is undefined?

2018-08-21 Thread Kai Stian Olstad

On 21.08.2018 17:05, Ford FasteRR wrote:

I'm seeing strange behavior in ansible 2.5.5 (on centos 6.10)

`facts_help.yml
---
- debug:
var: fake_fact
- debug:
var: new_fact

- set_fact:
new_fact: fake_fact
when: fake_fact is defined


Indentation error, when: is a property for the task.
Here you set a variable called when to the string "fake_fact is defined"


As you can see, fake_fact is undefined, and debug validates that. The 
when:

clause evaluates to true, and allows new_fact to be set (that's my
problem)..

Afterwards, a repeat of the debug on fake_fact still appears undefined.

So I'm not sure if this really a feature that I don't understand, a 
bug, or

just a user error?


User error.

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


Re: [ansible-project] Ansible set_fact sets fact even when another fact is undefined?

2018-08-21 Thread Karl Auer
The when clause should line up under set_fact. When I indent it properly,
that play is skipped as expected. Not sure why the wrongly indented version
is not picked up as a syntax error.

Here is the playbook I ran:

---
- hosts: localhost
  gather_facts: false
  become: false

  tasks:
 - debug:
 var: fake_fact
 - debug:
 var: new_fact

 - set_fact:
 new_fact: fake_fact
   when: fake_fact is defined

 - debug:
 var: fake_fact
 - debug:
 var: new_fact

And here are the results:


PLAY [localhost]
***

TASK [debug]
***
ok: [localhost] => {
"fake_fact": "VARIABLE IS NOT DEFINED!: 'fake_fact' is undefined"
}

TASK [debug]
***
ok: [localhost] => {
"new_fact": "VARIABLE IS NOT DEFINED!: 'new_fact' is undefined"
}

TASK [set_fact]

skipping: [localhost] => {"changed": false, "skip_reason": "Conditional
result was False"}

TASK [debug]
***
ok: [localhost] => {
"fake_fact": "VARIABLE IS NOT DEFINED!: 'fake_fact' is undefined"
}

TASK [debug]
***
ok: [localhost] => {
"new_fact": "VARIABLE IS NOT DEFINED!: 'new_fact' is undefined"
}

PLAY RECAP
*
localhost  : ok=4changed=0unreachable=0failed=0


You are setting new_fact to the literal string "fake_fact", not to the
value of a variable called fake_fact. Not sure that's relevant at this
point.

Regards, K.



On Wed, Aug 22, 2018 at 1:05 AM, Ford FasteRR  wrote:

>
> 0down votefavorite
> 
>
> I'm seeing strange behavior in ansible 2.5.5 (on centos 6.10)
>
> `facts_help.yml
> ---
> - debug:
> var: fake_fact
> - debug:
> var: new_fact
>
> - set_fact:
> new_fact: fake_fact
> when: fake_fact is defined
>
> - debug:
> var: fake_fact
> - debug:
> var: new_fact`
>
> I see this output:
>
> PLAY [localhost]
> *
>
> TASK [Gathering Facts]
> ***
> ok: [localhost]
>
> TASK [include_tasks]
> *
> included: /etc/ansible/facts_help.yml for localhost
>
> TASK [debug]
> *
> ok: [localhost] => {
> "fake_fact": "VARIABLE IS NOT DEFINED!"
> }
>
> TASK [debug]
> *
> ok: [localhost] => {
> "new_fact": "VARIABLE IS NOT DEFINED!"
> }
>
> TASK [set_fact]
> **
> ok: [localhost]
>
> TASK [debug]
> *
> ok: [localhost] => {
> "fake_fact": "VARIABLE IS NOT DEFINED!"
> }
>
> TASK [debug]
> *
> ok: [localhost] => {
> "new_fact": "fake_fact"
> }
>
> PLAY RECAP
> ***
> localhost  : ok=7changed=0unreachable=0failed=0
>
> As you can see, fake_fact is undefined, and debug validates that. The
> when: clause evaluates to true, and allows new_fact to be set (that's my
> problem)..
>
> Afterwards, a repeat of the debug on fake_fact still appears undefined.
>
> So I'm not sure if this really a feature that I don't understand, a bug,
> or just a user 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/d0f5ff3f-e5f9-4645-83e4-c564cc7f378b%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Karl Auer

Email  : ka...@2pisoftware.com
Website: http://2pisoftware.com

GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA

-- 
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, sen

Re: [ansible-project] which tags are being used in runtime?

2018-08-21 Thread Jonathan Lozada De La Matta
either there's a tag: name in the playbook or in the tasks.

On Tue, Aug 21, 2018 at 11:11 AM Mauricio Castro <
mauricioscas...@hotmail.com> wrote:

> Hello all, is there a way to know during playbook execution which tags it
> was called with in command line with -t ?
>
> I mean given *ansible-playbook -t x,y,z *how do I know inside the
> playbook I am only executing tasks with those tags?
>
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+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/e69261c8-44d6-4366-ae11-c258095af5b5%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Jonathan lozada de la matta

AUTOMATION CONSULTANT - AUTOMATION PRACTICE

Red Hat Consulting Services 

jloza...@redhat.com

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 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%2BKpoY7BLTW9ys3syED_ToiCiR5Kx%2Bx6Ris3-xjfb3Ci0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] which tags are being used in runtime?

2018-08-21 Thread Mauricio Castro
Hello all, is there a way to know during playbook execution which tags it 
was called with in command line with -t ?

I mean given *ansible-playbook -t x,y,z *how do I know inside the playbook 
I am only executing tasks with those tags?


Thanks 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+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/e69261c8-44d6-4366-ae11-c258095af5b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible set_fact sets fact even when another fact is undefined?

2018-08-21 Thread Ford FasteRR

0down votefavorite 


I'm seeing strange behavior in ansible 2.5.5 (on centos 6.10)

`facts_help.yml
---
- debug:
var: fake_fact
- debug:
var: new_fact

- set_fact:
new_fact: fake_fact
when: fake_fact is defined

- debug:
var: fake_fact
- debug:
var: new_fact`

I see this output:

PLAY [localhost] 
*

TASK [Gathering Facts] 
***
ok: [localhost]

TASK [include_tasks] 
*
included: /etc/ansible/facts_help.yml for localhost

TASK [debug] 
*
ok: [localhost] => {
"fake_fact": "VARIABLE IS NOT DEFINED!"
}

TASK [debug] 
*
ok: [localhost] => {
"new_fact": "VARIABLE IS NOT DEFINED!"
}

TASK [set_fact] 
**
ok: [localhost]

TASK [debug] 
*
ok: [localhost] => {
"fake_fact": "VARIABLE IS NOT DEFINED!"
}

TASK [debug] 
*
ok: [localhost] => {
"new_fact": "fake_fact"
}

PLAY RECAP 
***
localhost  : ok=7changed=0unreachable=0failed=0

As you can see, fake_fact is undefined, and debug validates that. The when: 
clause evaluates to true, and allows new_fact to be set (that's my 
problem)..

Afterwards, a repeat of the debug on fake_fact still appears undefined.

So I'm not sure if this really a feature that I don't understand, a bug, or 
just a user 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/d0f5ff3f-e5f9-4645-83e4-c564cc7f378b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] location of `group_vars/` for included playbooks changed in 2.4+ ?

2018-08-21 Thread Matt Martz
This is documented at
https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.4.html#initial-playbook-relative-group-vars-and-host-vars

Effectively, you want to make sure your group_vars is relative to your
inventory file, and not your playbook file.

On Tue, Aug 21, 2018 at 3:15 AM Riccardo Murri 
wrote:

> Hello,
>
> I am updating some playbooks written initially for Ansible 2.2. and 2.3 to
> remove the features that were deprecated in Ansible 2.4+
>
> The playbook is divided across multiple files, where `main.yml` would
> `include: roles/play_a.yml` (at playbook level), and then `play_a.yml`
> would call roles (e.g.) `a1`, `a2`, etc.  Global variables are defined in
> `group_vars/all`, where `group_vars/` is a sibling of `main.yml`:
>
> ```
> playbook_dir
>   |
>   +- main.yml
>   +- group_vars/
>   |   |
>   |   `- all
>   +- roles/
>   |
>   +- play_a.yml
>   +- a1/
>   +- a2/
>   ...
> ```
>
> Now, if I change playbook-level `include:` in `main.yml` to
> `import_playbook:` then group variables are no longer available to roles
> included in the play...  I have to make an additional `group_vars/all` file
> in the `roles/` subdirectory.
>
> Is this the expected behavior?  Did I miss some important warning about
> the (relatively) new `import_playbook:` ?
>
> Thanks,
> Riccardo
>
> --
> 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/7f3123c6-0ee0-49a2-b42d-dd111b1a8ac6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
@sivel
sivel.net

-- 
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/CAD8N0v8-81CjufO-cbVJE69KH4J6zMtCuBupcuQY-HAfc%3DSDDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Solution for add keys mutual

2018-08-21 Thread Jonathan Lozada De La Matta
Do one host first then the other if you are doing this manually. If you are
trying to use ansible to exactly do this steps then use the user module and
authorized_key

On Tue, Aug 21, 2018 at 9:24 AM Henrik Schuetze  wrote:

> the syntax for ssh-copy-id is: ssh-copy-id -i ~/.ssh/mykey user@host
>
> And i want:   from Host1 to Host2
>   and from host2 to host1
>
> I don't know how to specify the other host in a such a scenario
>
>
>
> Am Dienstag, 21. August 2018 15:15:29 UTC+2 schrieb Jonathan Lozada De La
> Matta:
>>
>> what do you mean? hard code what exactly?
>>
>> On Tue, Aug 21, 2018 at 9:13 AM Henrik Schuetze 
>> wrote:
>>
>>> thanx. but i need to address the other host. And i dont want to hard
>>> code the ip adress in this task
>>>
>>>
>>>
>>>
>>> Am Dienstag, 21. August 2018 14:39:30 UTC+2 schrieb Henrik Schuetze:

 Hi,

 i want to enable ssh between two linux hosts.
 i generate the ssh key on both hosts.
 and then i need to add the keys on the other servers respectively

 Does anyone has a ready solution for that?


 greetings
 Henrik

>>> --
>>> 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/210cb9fc-9e1c-4883-9b1f-6c0f63e90931%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>>
>> Jonathan lozada de la matta
>>
>> AUTOMATION CONSULTANT - AUTOMATION PRACTICE
>>
>> Red Hat Consulting Services 
>>
>> jloz...@redhat.com
>>
>>
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 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/9c6a2a11-0998-4be8-98e4-387040089eaf%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Jonathan lozada de la matta

AUTOMATION CONSULTANT - AUTOMATION PRACTICE

Red Hat Consulting Services 

jloza...@redhat.com

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 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%2BL0PJKVVv1T2jCzS2WH-cd0XoX0Y5hJ0T4t2UUTjadLYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Galaxy Release 3.0.8

2018-08-21 Thread chousekn
Galaxy bug fix release 3.0.8 will be deployed tomorrow morning, 22 August, 
at 4:00 AM Eastern.

This release includes the following:

Bug Fixes
   
   - Made the help link more obvious, and added a link to the Galaxy 
   project issue queue. Issue 1006 
   .
   - Upgraded to latest version of patternfly-ng. Issue 1010 
   .
   - Fixed issues related to patternfly-ng upgrade.
   - Limited display of container logs in Travis CI builds.
   - Added support for travis-ci.com server. Issue 1033 
   .
   - Improved Galaxy server side logging.
   - Set the avatar URL attribute during Provider Namespace creation.
   - Added AnsibleFest 2018 image to the home page.
   - Reformatted APB parameter metadata.
   - Implemented prettier to enforce Typescript and Less code formatting.
   - Improved TypeScript linting.

Closed 
PRs
   
   - 1084 Prevent queries on sensitive fields #1084 
   
   - 1070 Fix spacing issues introduced by patternfly update 
   
   - 1069 Added help link which links to the github issues 
   
   - 1066 Add spinner to indicate when page is loading. 
   
   - 1065 Fix about modal. 
   - 1064 Fix patternfly error messages. 
   
   - 1060 Fix make dev/log (#1041) 
   
   - 1058 Support multiple Travis CI servers 
   
   - 1057 Release/3.0.8 request id logging 
   
   - 1053 Make documentation link more visible. 
   
   - 1051 Set ProviderNamespace.avatar_url (#1035) 
   
   - 1050 Updated galaxy team 
   - 1044 Upgrade to latest patternfly-ng 
   
   - 1027 Reformat some APB parameter metadata on save 
   
   - 1023 Enforce TypeScript and Less code formatting with prettier. 
   
   - 1021 Disable lazy loading on my content 
   
   - 1020 Remove TS unused variables 
   
   - 1019 Fix license in galaxyui package.json 
   
   - 1018 Enable no-consecutive-blank-lines rule 
   
   - 1017 Enable tslint interface-name rule 
   
   - 1016 Enable prefer-for-of in tslint 
   
   - 1015 Backport/866 tslint recommend 
   
   - 1014 Backport/739 lazy loading 
   


We don't anticipate any downtime for Galaxy. However, if you do experience 
a problem, please let us know by opening an issue at the Galaxy project 
.

-- 
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/d4a8046c-c327-422d-812f-4d93e5f297d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Solution for add keys mutual

2018-08-21 Thread Henrik Schuetze
the syntax for ssh-copy-id is: ssh-copy-id -i ~/.ssh/mykey user@host

And i want:   from Host1 to Host2
  and from host2 to host1

I don't know how to specify the other host in a such a scenario



Am Dienstag, 21. August 2018 15:15:29 UTC+2 schrieb Jonathan Lozada De La 
Matta:
>
> what do you mean? hard code what exactly?
>
> On Tue, Aug 21, 2018 at 9:13 AM Henrik Schuetze  > wrote:
>
>> thanx. but i need to address the other host. And i dont want to hard code 
>> the ip adress in this task
>>
>>
>>
>>
>> Am Dienstag, 21. August 2018 14:39:30 UTC+2 schrieb Henrik Schuetze:
>>>
>>> Hi,
>>>
>>> i want to enable ssh between two linux hosts.
>>> i generate the ssh key on both hosts.
>>> and then i need to add the keys on the other servers respectively
>>>
>>> Does anyone has a ready solution for that?
>>>
>>>
>>> greetings
>>> Henrik
>>>
>> -- 
>> 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/210cb9fc-9e1c-4883-9b1f-6c0f63e90931%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
>
> Jonathan lozada de la matta
>
> AUTOMATION CONSULTANT - AUTOMATION PRACTICE
>
> Red Hat Consulting Services 
>
> jloz...@redhat.com 
>
>
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 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/9c6a2a11-0998-4be8-98e4-387040089eaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: docker connection over remote host tcp no tls

2018-08-21 Thread Tom van Duist
Hey,

Did you ever solve this issue?

I'm running in to the same problem..

Op maandag 20 november 2017 08:09:47 UTC schreef Esteban Mirizio:
>
> Hi everyone! 
>
> I'm Having a hard time trying to a remote docker connection over non tls. 
> What I'm trying to achieve is to execute an ansible playbook inside a 
> docker located in host A to another docker located in host B, FYI network 
> mode is set to *"host" *on both docker hosts.
>
> This is the playbook I'm trying to execute:
>
>
> - hosts: localhost
>   tasks:
>   - name: add container to inventory
> add_host:
>   name: git-slave
>   ansible_connection: docker
>   ansible_docker_extra_args: "-H=tcp://192.168.255.2:2375"
>   ansible_user: root
> changed_when: false
>   - name: Test gitblit
> delegate_to: git-slave
> raw: cat /var/log/gitblit
>
>
> This is the error I'm getting:
>
> fatal: [localhost]: UNREACHABLE! => {
> "changed": false,
> "msg": "Authentication or permission failure. In some cases, you may 
> have been able to authenticate and did not have permissions on the target 
> directory. Consider changing the remote temp path in ansible.cfg to a path 
> rooted in \"/tmp\". Failed command was: ( umask 77 && mkdir -p \"` echo 
> ~/.ansible/tmp/ansible-tmp-1511161385.72-174791577619947 `\" && echo 
> ansible-tmp-1511161385.72-174791577619947=\"` echo 
> ~/.ansible/tmp/ansible-tmp-1511161385.72-174791577619947 `\" ), exited with 
> result 1, stderr output: tls: oversized record received with length 
> 20527\n",
> "unreachable": true
> }
>
> Here some test I did:
>
>
>1. Ping from Host A to Host B
>
>root@integration-centralothers0:/home/ubuntu# ping -c3 192.168.255.2
>PING 192.168.255.2 (192.168.255.2) 56(84) bytes of data.
>64 bytes from 192.168.255.2: icmp_seq=1 ttl=63 time=2.44 ms
>64 bytes from 192.168.255.2: icmp_seq=2 ttl=63 time=2.17 ms
>64 bytes from 192.168.255.2: icmp_seq=3 ttl=63 time=1.66 ms
>
>--- 192.168.255.2 ping statistics ---
>3 packets transmitted, 3 received, 0% packet loss, time 2003ms
>rtt min/avg/max/mdev = 1.662/2.094/2.447/0.329 ms
>
>
>2. Telnet from Host A to Host B against docker remote API:
>root@integration-centralothers0:/home/ubuntu# telnet 192.168.255.2 2375
>Trying 192.168.255.2...
>Connected to 192.168.255.2.
>Escape character is '^]'.
>
>HTTP/1.1 400 Bad Request
>Content-Type: text/plain; charset=utf-8
>Connection: close
>
>400 Bad RequestConnection closed by foreign host.
>
>3. Remote Docker API test from Host A to Host B using curl
>curl -s -XGET http://192.168.255.2:2375/v1.24/images/json
>
>--Response--
>
>
> [{"Containers":-1,"Created":1510250403,"Id":"sha256:20233e267b88092164b554dcf2c7803d2c1eca109fa9224387e02df38e4c915d","Labels":{"com.ansible.container.fingerprint":"f6577dc923ef7ca2954ee10ef99b01f17e953bd26feef91b6ed4609fbd2af7cc"},"ParentId":"","RepoDigests":["
>
> registry.rando.b-yond.com:5000/rando/rando-git-slave@sha256:f5b16936de627ad526042d40a695653b79c1ff0031bd0a9cae09a75e10d1008d
>"],
>
>
>4. Execution of ansible playbook using local docker connection from 
>inside HOST B to the target docker
>
>ansible all -i rando_git-slave_1, - -c docker -u root -m command 
>-a "cat /var/log/gitblit.log"
>ansible 2.4.1.0
>  config file = /etc/ansible/ansible.cfg
>  configured module search path = [u'/root/.ansible/plugins/modules', 
>u'/usr/share/ansible/plugins/modules']
>  ansible python module location = 
>/usr/lib/python2.7/dist-packages/ansible
>  executable location = /usr/bin/ansible
>  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 
>20160609]
>Using /etc/ansible/ansible.cfg as config file
>setting up inventory plugins
>Parsed rando_git-slave_1, inventory source with host_list plugin
>Loading callback plugin minimal of type stdout, v2.0 from 
>/usr/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc
>META: ran handlers
>Using module file 
>/usr/lib/python2.7/dist-packages/ansible/modules/commands/command.py
> ESTABLISH DOCKER CONNECTION FOR USER: root
> EXEC ['/usr/bin/docker', 'exec', '-u', u'root', 
>'-i', u'rando_git-slave_1', u'/bin/sh', '-c', u"/bin/sh -c 'echo ~ && 
> sleep 
>0'"]
> EXEC ['/usr/bin/docker', 'exec', '-u', u'root', 
>'-i', u'rando_git-slave_1', u'/bin/sh', '-c', u'/bin/sh -c \'( umask 77 && 
>mkdir -p "` echo 
>/root/.ansible/tmp/ansible-tmp-1511165208.65-101293422432691 `" && echo 
>ansible-tmp-1511165208.65-101293422432691="` echo 
>/root/.ansible/tmp/ansible-tmp-1511165208.65-101293422432691 `" ) && sleep 
>0\'']
> PUT /tmp/tmpYGG6kk TO 
>/root/.ansible/tmp/ansible-tmp-1511165208.65-101293422432691/command.py
> EXEC ['/usr/bin/docker', 'exec', '-u', u'root', 
>'-i', u'rando_git-slave_1', u'/bin/sh', 

Re: [ansible-project] Re: Solution for add keys mutual

2018-08-21 Thread Jonathan Lozada De La Matta
what do you mean? hard code what exactly?

On Tue, Aug 21, 2018 at 9:13 AM Henrik Schuetze  wrote:

> thanx. but i need to address the other host. And i dont want to hard code
> the ip adress in this task
>
>
>
>
> Am Dienstag, 21. August 2018 14:39:30 UTC+2 schrieb Henrik Schuetze:
>>
>> Hi,
>>
>> i want to enable ssh between two linux hosts.
>> i generate the ssh key on both hosts.
>> and then i need to add the keys on the other servers respectively
>>
>> Does anyone has a ready solution for that?
>>
>>
>> greetings
>> Henrik
>>
> --
> 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/210cb9fc-9e1c-4883-9b1f-6c0f63e90931%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Jonathan lozada de la matta

AUTOMATION CONSULTANT - AUTOMATION PRACTICE

Red Hat Consulting Services 

jloza...@redhat.com

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 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%2BKybxLVvAp%3DzrgaurZmPLCu%2BQXf5rXWr4UvteP-b9Tidg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Solution for add keys mutual

2018-08-21 Thread Henrik Schuetze
thanx. but i need to address the other host. And i dont want to hard code 
the ip adress in this task




Am Dienstag, 21. August 2018 14:39:30 UTC+2 schrieb Henrik Schuetze:
>
> Hi,
>
> i want to enable ssh between two linux hosts.
> i generate the ssh key on both hosts.
> and then i need to add the keys on the other servers respectively
>
> Does anyone has a ready solution for that?
>
>
> greetings
> Henrik
>

-- 
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/210cb9fc-9e1c-4883-9b1f-6c0f63e90931%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Solution for add keys mutual

2018-08-21 Thread S C Rigler
Look at ssh-copy-id

On Tue, Aug 21, 2018, 7:39 AM Henrik Schuetze  wrote:

> Hi,
>
> i want to enable ssh between two linux hosts.
> i generate the ssh key on both hosts.
> and then i need to add the keys on the other servers respectively
>
> Does anyone has a ready solution for that?
>
>
> greetings
> Henrik
>
> --
> 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/ee33b3bc-5588-40b9-a3e3-ad1fe5ecacb4%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+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/CAFbiokdCfUB6TimUNF8EW92t0dn6WVT40ng75KmFUpKi9zpt9Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Solution for add keys mutual

2018-08-21 Thread Jonathan Lozada De La Matta
https://www.ssh.com/ssh/copy-id

On Tue, Aug 21, 2018 at 8:39 AM Henrik Schuetze  wrote:

> Hi,
>
> i want to enable ssh between two linux hosts.
> i generate the ssh key on both hosts.
> and then i need to add the keys on the other servers respectively
>
> Does anyone has a ready solution for that?
>
>
> greetings
> Henrik
>
> --
> 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/ee33b3bc-5588-40b9-a3e3-ad1fe5ecacb4%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Jonathan lozada de la matta

AUTOMATION CONSULTANT - AUTOMATION PRACTICE

Red Hat Consulting Services 

jloza...@redhat.com

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 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%2B%2Bi4foLEPOMRMR35Fgo3HZzkTWROYf7u4GGhzgj5F3-ow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Solution for add keys mutual

2018-08-21 Thread Henrik Schuetze
Hi,

i want to enable ssh between two linux hosts.
i generate the ssh key on both hosts.
and then i need to add the keys on the other servers respectively

Does anyone has a ready solution for that?


greetings
Henrik

-- 
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/ee33b3bc-5588-40b9-a3e3-ad1fe5ecacb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] ansible on docker installation

2018-08-21 Thread nbctcp
Hi,

I am trying to install ansible on docker on Ubuntu Desktop 18.04LTS

PROBLEMS:
1. error when try to docker run
2. whether docker hub ansible/ansible already has ssh client/server inside 
it
If doesn't then how to install ssh inside container

What steps I miss
tq

STEPS
Docker
# apt-get update
# apt-get install apt-transport-https ca-certificates curl 
software-properties-common
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key 
add -
Verify that you now have the key with the fingerprint9DC8 5822 9FC7 DD38 
854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of 
the fingerprint.
# apt-key fingerprint 0EBFCD88
pub   4096R/0EBFCD88 2017-02-22
  Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid  Docker Release (CE deb) 
sub   4096R/F273FCD8 2017-02-22
# add-apt-repository "deb [arch=amd64] 
https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
# apt-get update
# apt-get install docker-ce

-add your current user to docker group
admin2$ sudo usermod -aG docker $USER
# systemctl enable docker && systemctl start docker


Ansible
# docker pull ansible/ansible:default
# docker run --rm -it 13030821a080
Failed to determine whether /sys is a mount point: Operation not permitted
Failed to determine whether /proc is a mount point: Operation not permitted
Failed to determine whether /dev is a mount point: Operation not permitted
Failed to determine whether /dev/shm is a mount point: Operation not 
permitted
Failed to determine whether /run is a mount point: Operation not permitted
Failed to determine whether /run/lock is a mount point: Operation not 
permitted
Failed to determine whether /sys/fs/cgroup is a mount point: Operation not 
permitted
Failed to determine whether /sys/fs/cgroup/systemd is a mount point: 
Operation not permitted
[!!] Failed to mount API filesystems, freezing.
Freezing execution.

-- 
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/9e97d4c5-618e-4fc4-9a8d-f64360ca2c1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] How to assign virtual network to sqlserver on Azure

2018-08-21 Thread Michael Wild
Dear all

I successfully created an SQL Server instance with the azure_rm_sqlserver 
module. However, for it to be useful, I need to connect it with a "vnet 
rule" to a virtual network. How can I do this? I would expect something 
similar to azure_rm_virtualmachine, but the azure_rm_sqlserver does not 
have the virtual_network_name parameter. Are there any complete 
example-playbooks I could take a look at? 

Kind regards

Michael

-- 
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/a8bdd806-f8ef-4321-a0fa-21c311a93f33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] location of `group_vars/` for included playbooks changed in 2.4+ ?

2018-08-21 Thread Riccardo Murri
Hello, 

I am updating some playbooks written initially for Ansible 2.2. and 2.3 to 
remove the features that were deprecated in Ansible 2.4+

The playbook is divided across multiple files, where `main.yml` would 
`include: roles/play_a.yml` (at playbook level), and then `play_a.yml` 
would call roles (e.g.) `a1`, `a2`, etc.  Global variables are defined in 
`group_vars/all`, where `group_vars/` is a sibling of `main.yml`:

```
playbook_dir
  |
  +- main.yml
  +- group_vars/
  |   |
  |   `- all
  +- roles/
  |
  +- play_a.yml
  +- a1/
  +- a2/
  ...
```

Now, if I change playbook-level `include:` in `main.yml` to 
`import_playbook:` then group variables are no longer available to roles 
included in the play...  I have to make an additional `group_vars/all` file 
in the `roles/` subdirectory.

Is this the expected behavior?  Did I miss some important warning about the 
(relatively) new `import_playbook:` ?

Thanks,
Riccardo

-- 
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/7f3123c6-0ee0-49a2-b42d-dd111b1a8ac6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] ansible.vault not working anymore?

2018-08-21 Thread vid . jelen1
Tried the python virtualenv and downgrading/upgrading all the possible 
packages with no success.  

But I finally resolved the issue after mingling with the system packages... 
I'm running python 2.7.12 and the issue for me was, that the libs 
*python3-crypto* & *python3-cffi-backend* were installed through the system 
package manager.

Uninstalling those immediately solved the problem :)



On Tuesday, August 14, 2018 at 11:40:04 AM UTC-7, Vid Jelen wrote:
>>
>> I think the upgrade brought in at least 25 updated packages, so it might 
>> be a bit messy to revert each & every one :/
>>
>> But I'll have a go at it and see what I can find from there.
>>
>>
>>
>>
>> On Tue, Aug 14, 2018 at 7:09 PM Dick Visser  wrote:
>>
>>> Hmm, that sounds like a somewhat volatile environment.
>>> In any case, if somethings "suddenly" stops working, I would suggest
>>> to find out what exactly changed that caused it to stop working.
>>> Carpet-upgrading involved libraries might fix the issue, but it's not
>>> going to make fault finding easier.
>>> What about reverting the package that came in through apt-get
>>> (interested to know which one)?
>>>
>>>
>>> Dick
>>>
>>> On 14 August 2018 at 18:23, Vid Jelen  wrote:
>>> > My current python cryptography version is 2.3 & I've also upgraded pip
>>> > itself via pip to 18.0
>>> >
>>> > Ansible version is 2.7.0
>>> >
>>> > I have tried reinstalling python cryptography several times with no
>>> > different results than the same error message.
>>> > The paramiko package also crossed my mind, so I updated that one as 
>>> well.
>>> > The issue still persists...
>>> >
>>> > The only thing that changed today was a package update with apt-get 
>>> update
>>> > && upgrade (running Linux Mint)
>>> >
>>> > On Tue, Aug 14, 2018 at 6:01 PM Matt Martz  wrote:
>>> >>
>>> >> Having just looked into this issue as it related to paramiko, the 
>>> problem
>>> >> is with having an outdated version of python cryptography installed.
>>> >>
>>> >> On Tue, Aug 14, 2018 at 10:56 AM Dick Visser 
>>> >> wrote:
>>> >>>
>>> >>> On 14 August 2018 at 15:35,  wrote:
>>> >>> >
>>> >>> > Had  a functional ansible-vault setup up until today.
>>> >>>
>>> >>> Without going into details - what changed on your system today?
>>> >>> Because logic dictates that ansible-vault (or any other tool, for 
>>> that
>>> >>> matter) doesn't stop working if nothing changed.
>>> >>>
>>> >>>
>>> >>> Dick
>>> >>>
>>> >>> --
>>> >>> 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/CAL8fbwP70Eh3nmEu9%3D%3DS_3CczLhc5AEWdmaiA%3Dj-u-rOF_jxMA%40mail.gmail.com
>>> .
>>> >>> For more options, visit https://groups.google.com/d/optout.
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Matt Martz
>>> >> @sivel
>>> >> sivel.net
>>> >>
>>> >> --
>>> >> 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/MXso_HZ_gzU/unsubscribe
>>> .
>>> >> To unsubscribe from this group and all its topics, 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/CAD8N0v-BjQoCoi28Zui0h92uwxEEYEYykmZbW2RvbtJTZYYCdw%40mail.gmail.com
>>> .
>>> >> For more options, visit https://groups.google.com/d/optout.
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google 
>>> Groups
>>> > "Ansible Project" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an
>>> > email to ansible-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/CA%2Bn_Oc3PkmExtcufgvTSugSaG_c2UZK3UwKAJ-PphU8gv8o%2BwA%40mail.gmail.com
>>> .
>>> >
>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>> -- 
>>> Dick Visser
>>> Trust & Identity Service Operations Manager
>>> GÉANT
>>> T: +31205304488
>>> M: +31622698108
>>> PGP key fingerprint: F575 58C6 62C6 FD5B A9CD 217C 2667 13D4 E6EF 488D
>>>
>>> GÉANT Vereniging (Association) is registered with the Chamber of
>>> Commerce in Amsterdam with registration number 40535155 and operates
>>> in the UK as a branch of GÉANT Vereniging. Registered office:
>>> Hoekenrode 3, 1102 BR Amsterdam, The Netherlands. UK branch address:
>>> City House, 126-130 Hills Road, Cambridge CB2 1PQ, UK.
>>>
>>>
>>> W

[ansible-project] ansible exadata module

2018-08-21 Thread bennet samuel
Just to know if ansible has any exadata/dcli/ module. If not, is the best 
practice to use shell command? 

-- 
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/fcee63cc-2651-4c9a-9bf0-6efb3dd6c162%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: ansible-pull configuration

2018-08-21 Thread SUMIT SAHAY

Hi Pshem,

Thanks for your reply.
I am getting following error, and not able to fix the issue,

"msg": "Failed to download remote objects and refs:  Ubuntu 16.04.3 
LTS\nPermission denied (publickey,password,keyboard-interactive).\r\nfatal: 
Could not read from remote repository.\n\nPlease make sure you have the 
correct access rights\nand the repository exists.\n"

Looking forward for your reply.

Regards
Sumit Sahay
7044112109

On Friday, 17 August 2018 03:15:41 UTC+5:30, Pshem Kowalczyk wrote:
>
> There are two things here:
>
> 1. If you're using SSH the public key of the remote server must be added 
> to 'known_hosts', for example like this:
>
> ssh-keyscan -t rsa github.com | sed "s/^[^ ]* //" >> ~/.ssh/known_hosts
>
> (alternatively you can get ansible to just accept whatever key is offered 
> with --accept-host-key)
>
> 2. Secondly you have to specify the private key associated with the repo 
> with --private-key
>
> kind regards
> Pshem
>
>
> On Thu, 16 Aug 2018 at 22:36 SUMIT SAHAY  > wrote:
>
>> Thanks Pshem for your reply.
>>
>> ansible-pull -U [git_url] -k playbook.yml --limit localhost
>>
>> I am using this command to run the ansible pull, while doing this I am 
>> getting one error, unable to resolve the error.
>>
>>
>> "msg": "Failed to download remote objects and refs:  Host key 
>> verification failed.\r\nfatal: Could not read from remote 
>> repository.\n\nPlease make sure you have the correct access rights\nand the 
>> repository exists.\n"
>>
>> Can you please help me out on this
>>
>>
>> Looking forward for your reply
>>
>>
>> Thanks & Regards
>> Sumit Sahay
>> 07044112109
>>
>> On Thu, Aug 16, 2018 at 3:56 PM, Pshem Kowalczyk > > wrote:
>>
>>> Hi,
>>>
>>> That's correct, in pull mode ansible modifies and sets things on the 
>>> machine on which it runs. The easiest way of providing inventory in this 
>>> case is via command line:
>>>
>>> -i $(hostname), 
>>>
>>> Please note the comma at the end.
>>>
>>> kind regards
>>> Pshem
>>>
>>>
>>> On Wed, 15 Aug 2018 at 02:55 SUMIT SAHAY >> > wrote:
>>>
 Thanks for your reply Jonathan.
 localhost : from where we are triggering command.
 This is what you want to say?

 Looking forward for your reply.

 Regards
 Sumit Sahay
 07044112109

 On Tue, Aug 14, 2018, 7:44 PM Jonathan Lozada De La Matta <
 jloz...@redhat.com > wrote:

> usually ansible-pull its used on localhost and not other hosts. If you 
> are trying to do other host then use regular ansible. Ansible-pull is a 
> different use case.
>
> On Tue, Aug 14, 2018 at 8:26 AM SUMIT SAHAY  > wrote:
>
>> Thanks Jonathan, for your reply.
>>
>> No, I am not using localhost, I want to run my playbook on ubuntu 
>> host which I set up in my host file, and the host file is located in 
>> /home/test/sumit/
>>
>> How to run this so that it will pick up the host and execute on 
>> ubuntu remote host.
>>
>> Looking forward for your reply.
>>
>> Thanks & Regards
>> Sumit Sahay
>> 7044112109
>>
>>
>> On Tue, Aug 14, 2018 at 5:17 PM, Jonathan Lozada De La Matta <
>> jloz...@redhat.com > wrote:
>>
>>> what hosts are on your playbook? is it localhost?
>>>
>>> On Tue, Aug 14, 2018 at 3:07 AM SUMIT SAHAY >> > wrote:
>>>
 Thanks Balz, for your reply.

 Could you help me with the command for ansible pull, I installed 
 git and repository and I committed the ansible playbook there now I 
 want to 
 run this from my localhost server following command I am using but 
 getting 
 error,

 ansible-pull -U https://repourl.com/git/user_name/git_location -k 
 -i /home/test/hosts playbook.yml

 getting error saying skipping the hosts.

 Could you please navigate me to the correct command.

 Looking forward for your reply.

 Regards
 Sumit Sahay
 7044112109

 On Wednesday, 8 August 2018 22:43:53 UTC+5:30, balz.as...@unibas.ch 
 wrote:
>
> Hi Sumit
>
> We're using a wrapper around ansible-pull. We use it mainly for 
> clients but we've a step-by-step guide you might find helpful:
> https://github.com/ANTS-Framework/ants
>
> Regards
> Balz
>
> Am Mittwoch, 8. August 2018 08:03:45 UTC+2 schrieb SUMIT SAHAY:
>>
>>
>> Hi All,
>>
>> I am trying to setup the ansible pull based on my vm server.
>>
>> Is there any step-wise documentation for this?
>>
>>
>> Regards
>> Sumit Sahay
>> 7044112109
>>
>
>> -- 
 You received this message because you are subscribed to the Google 
 Groups "Ansible Project" group.
 To unsubscribe from this group and st