Re: [ansible-project] Re: msg: Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!

2018-08-13 Thread Jonathan Lozada De La Matta
My understanding its because not all systems have selinux enabled so having
it as a dependency its not a good idea. Although if you run into this issue
the output tells you what it needs.

On Mon, Aug 13, 2018 at 10:04 PM Joaquin Menchaca 
wrote:

> I had this issue Ansible 2.6.2 on Fedora 28 system using Ansible local
> connection.  Doing /usr/bin/dnf install -y libselinux-python fixed it for
> me.  Thanks.
>
> I wonder why Ansible doesn't install needed prereq?
>
> --
> 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/899412d1-4f91-4c1a-ae27-8cda8a6060ec%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%2BeTv%3DH9V%2Btu6Xj3DLcrxydFtmBUVJUThkFEDD_ecRtSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] "Provides" to ease dependencies?

2018-08-13 Thread Jonathan Lozada De La Matta
can you provide a more in dept example of how you currently do it?

On Mon, Aug 13, 2018 at 5:47 PM Toni Mueller  wrote:

>
> Hi,
>
> from normal package management systems, I am used to have "Provides"
> which allows me to install any of a set of packages to satisfy a
> dependency (eg. "Provides: mail-transport-agent"). I was wondering how
> to best achieve a similar effect with Ansible, so I do not have to
> hardwire all the role names in many places. Eg. if I want to switch
> from one role that installs MySQL to one of the dozens of other roles
> which do "basically" the same, I would like to just depend on a role
> that provides "database-server", then decide later which database engine
> I actually want by selecting one role that installs a database server
> without having to go back to all the roles which are installing
> applications depending on a database server to reference a different
> role.
>
> How are you guys tackling this kind of problem?
>
>
> Kind regards,
> Toni
>
> --
> 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/20180813214709.xfofs4zt3kcqxls4%40spruce.office.oeko.net
> .
> 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/CAFYJA%2BJ50EwXpM8wPpb2KHRsas2D4_tzx_BVKNFziORwP5Obpg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: msg: Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!

2018-08-13 Thread Joaquin Menchaca
I had this issue Ansible 2.6.2 on Fedora 28 system using Ansible local 
connection.  Doing /usr/bin/dnf install -y libselinux-python fixed it for 
me.  Thanks.

I wonder why Ansible doesn't install needed prereq?

-- 
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/899412d1-4f91-4c1a-ae27-8cda8a6060ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] nxos_facts - fails on a lot of versions.

2018-08-13 Thread Jonathan Lozada De La Matta
Dennis,

I'm not an expert on networking but, we can try to gather some information
and track it down. How does your playbook/role look like ? did you follow
the instructions in here
https://docs.ansible.com/ansible/2.5/network/user_guide/platform_nxos.html#nxos-platform-options
?

On Mon, Aug 13, 2018 at 6:44 PM Dennis McCarthy 
wrote:

> I'm running ansible 2.5.5-1.
> It seems that the issue I have where the nxos_module spits out an error
> seem to be related to the version or image on the device I'm trying to
> connect to.
> I think the error is saying that the object containing stdout doesn't have
> a get() method. "unicode", that there is like a sub-class of string, right?
>
> I'm reading thru issues on git-hub, but they talk way over my head.
> ELI5 (Explain it Like I'm 5);
>   IS this fixed in 2.6?
>   Is this a "too bad, so sad" sort of issue where I just need to get newer
> switches or older ansible?
>
> The Error:
> fatal: [NDDCBPSWNX01]: FAILED! => changed=false
>   module_stderr: |-
> Traceback (most recent call last):
>   File "/tmp/ansible_5wMQsv/ansible_module_nxos_facts.py", line 602,
> in 
> main()
>   File "/tmp/ansible_5wMQsv/ansible_module_nxos_facts.py", line 585,
> in main
> inst.populate()
>   File "/tmp/ansible_5wMQsv/ansible_module_nxos_facts.py", line 233,
> in populate
> if data.get('sys_ver_str'):
> AttributeError: 'unicode' object has no attribute 'get'
>   module_stdout: ''
>   msg: MODULE FAILURE
>   rc: 1
> An exception occurred during task execution. To see the full traceback,
> use -vvv. The error was: AttributeError: 'unicode' object has no attribute
> 'get'
>
>
> The results of my testing:
>
> Connection IOSVersion
> Failed 5.2(1)N1(1), RELEASE SOFTWARE Copyright (c) 2002-2011 by Cisco
> Systems, Inc. Device Manager Version 6.1(1),  Compiled 7/12/2012 19:00:00
> Worked 6.0(2)A6(4), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco
> Systems, Inc.   Compiled 8/18/2015 13:00:00
> Worked 6.0(2)A8(3), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco
> Systems, Inc.   Compiled 10/28/2016 20:00:00
> Failed 6.0(2)N1(2), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco
> Systems, Inc. Device Manager Version 6.0(2)N1(1),  Compiled 3/14/2013
> 1:00:00
> Worked 6.0(2)U6(10), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco
> Systems, Inc.   Compiled 3/30/2017 9:00:00
> Failed 6.0(4), RELEASE SOFTWARE Copyright (c) 2002-2011 by Cisco Systems,
> Inc. Compiled 6/6/2012 18:00:00
> Failed 6.1(2), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco Systems,
> Inc. Compiled 9/7/2012 13:00:00
> Failed 6.2(16), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco
> Systems, Inc. Compiled 1/27/2016 9:00:00
> Failed 7.0(1)N1(1), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco
> Systems, Inc. Device Manager Version 6.3(1),  Compiled 3/19/2014 14:00:00
> Worked 7.0(3)I2(2a), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco
> Systems, Inc. Compiled 12/14/2015 3:00:00
> Worked 7.0(3)I2(2b), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco
> Systems, Inc. Compiled 2/28/2016 19:00:00
> Worked 7.0(3)I5(1), RELEASE SOFTWARE Copyright (c) 2002-2016 by Cisco
> Systems, Inc. Compiled 10/29/2016 8:00:00
> Worked 7.3(2)N1(1), RELEASE SOFTWARE Copyright (c) 2002-2012, 2016-2017
> by Cisco Systems, Inc. Device Manager Version 6.0(2)N1(1),Compiled
> 5/12/2017 23:00:00
>
> --
> 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/485a2dcf-4c76-41a4-a0ae-448dec9f81e9%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%2BJ_GB%2B9HhoCRT6w3xr14pmyv%3DekmQVvRPKHL6z%3D4cdu8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Need some help using Kerberos Authentication for Windows Target

2018-08-13 Thread Jordan Borean
I prefer using pip because system packages are system wide but I come from 
a developer focused background. Another reason why I'm not a fan of system 
packages is that they usually lag behind what is available in pip. There 
are definitely benefits to using system packages but it's not for me.

When looking at the stracktrace we can see line 212 is in the handle_other 
function whereas it is in another function on the v0.12.0 release 
https://github.com/requests/requests-kerberos/blob/v0.12.0/requests_kerberos/kerberos_.py#L212.
 
This tells me that an older (probably really old) version from the system 
package install is overriding whatever pip may have installed originally. 
To create a new environment not polluted by the system packages, please 
create a virtualenv with the following commands;

virtualenv ansible-test
source ansible-test/bin/activate
pip install ansible pywinrm[kerberos]

ansible all -i kerbauth -m win_ping -v

If this works then you know you need to look at the packages that are 
installed.

Thanks

Jordan

-- 
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/6958960f-a9c5-4705-b4d4-56512135f689%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] nxos_facts - fails on a lot of versions.

2018-08-13 Thread Dennis McCarthy
I'm running ansible 2.5.5-1.
It seems that the issue I have where the nxos_module spits out an error 
seem to be related to the version or image on the device I'm trying to 
connect to.
I think the error is saying that the object containing stdout doesn't have 
a get() method. "unicode", that there is like a sub-class of string, right?

I'm reading thru issues on git-hub, but they talk way over my head. 
ELI5 (Explain it Like I'm 5);
  IS this fixed in 2.6?
  Is this a "too bad, so sad" sort of issue where I just need to get newer 
switches or older ansible?

The Error:
fatal: [NDDCBPSWNX01]: FAILED! => changed=false
  module_stderr: |-
Traceback (most recent call last):
  File "/tmp/ansible_5wMQsv/ansible_module_nxos_facts.py", line 602, in 

main()
  File "/tmp/ansible_5wMQsv/ansible_module_nxos_facts.py", line 585, in 
main
inst.populate()
  File "/tmp/ansible_5wMQsv/ansible_module_nxos_facts.py", line 233, in 
populate
if data.get('sys_ver_str'):
AttributeError: 'unicode' object has no attribute 'get'
  module_stdout: ''
  msg: MODULE FAILURE
  rc: 1
An exception occurred during task execution. To see the full traceback, use 
-vvv. The error was: AttributeError: 'unicode' object has no attribute 'get'


The results of my testing:

Connection IOSVersion
Failed 5.2(1)N1(1), RELEASE SOFTWARE Copyright (c) 2002-2011 by Cisco 
Systems, Inc. Device Manager Version 6.1(1),  Compiled 7/12/2012 19:00:00
Worked 6.0(2)A6(4), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco 
Systems, Inc.   Compiled 8/18/2015 13:00:00
Worked 6.0(2)A8(3), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco 
Systems, Inc.   Compiled 10/28/2016 20:00:00
Failed 6.0(2)N1(2), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco 
Systems, Inc. Device Manager Version 6.0(2)N1(1),  Compiled 3/14/2013 
1:00:00
Worked 6.0(2)U6(10), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco 
Systems, Inc.   Compiled 3/30/2017 9:00:00
Failed 6.0(4), RELEASE SOFTWARE Copyright (c) 2002-2011 by Cisco Systems, 
Inc. Compiled 6/6/2012 18:00:00
Failed 6.1(2), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco Systems, 
Inc. Compiled 9/7/2012 13:00:00
Failed 6.2(16), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, 
Inc. Compiled 1/27/2016 9:00:00
Failed 7.0(1)N1(1), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco 
Systems, Inc. Device Manager Version 6.3(1),  Compiled 3/19/2014 14:00:00
Worked 7.0(3)I2(2a), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco 
Systems, Inc. Compiled 12/14/2015 3:00:00
Worked 7.0(3)I2(2b), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco 
Systems, Inc. Compiled 2/28/2016 19:00:00
Worked 7.0(3)I5(1), RELEASE SOFTWARE Copyright (c) 2002-2016 by Cisco 
Systems, Inc. Compiled 10/29/2016 8:00:00
Worked 7.3(2)N1(1), RELEASE SOFTWARE Copyright (c) 2002-2012, 2016-2017 by 
Cisco Systems, Inc. Device Manager Version 6.0(2)N1(1),Compiled 5/12/2017 
23:00:00

-- 
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/485a2dcf-4c76-41a4-a0ae-448dec9f81e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] clock summer-time & ios_config: config reruns all the time...

2018-08-13 Thread Geert Nijs
Ansible doesn't see that it is configured:

tasks: 
  
  - name: configure timezone
become: yes
ios_config:
 lines:
  - clock timezone CET 1 0
  - clock summer-time CEST recurring last Sun Mar 2:00 last Sun Oct 3:00

each time , i run it status is "changed", command that is triggering the 
change is: "clock summer-time"

I don't see any difference, why is ansible not skipping ?
Might it have something to do with the special characters in the string: 
":" and "-" ???



running Ansible 2.5.2 in Tower

{
"_ansible_parsed": true,
"commands": [
"clock summer-time CEST recurring last Sun Mar 2:00 last Sun Oct 
3:00"
],
"_ansible_no_log": false,
   * "changed": true,*
"updates": [
"clock summer-time CEST recurring last Sun Mar 2:00 last Sun Oct 
3:00"
],
"invocation": {
"module_args": {
"multiline_delimiter": "@",
"authorize": null,
"force": false,
"diff_against": null,
"replace": "line",
"running_config": null,
"save_when": "never",
"port": null,
"before": null,
"auth_pass": null,
"parents": null,
"provider": null,
"save": false,
"match": "line",
"username": null,
"defaults": false,
"after": null,
"host": null,
"password": null,
"diff_ignore_lines": null,
"src": null,
"ssh_keyfile": null,
"lines": [
"clock timezone CET 1 0",
"clock summer-time CEST recurring last Sun Mar 2:00 last 
Sun Oct 3:00"
],
"intended_config": null,
"timeout": null,
"backup": false
}
},
"banners": {}
}

-- 
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/1c0a9bdd-12fb-4ef6-b461-1bb76e499476%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] "Provides" to ease dependencies?

2018-08-13 Thread Toni Mueller


Hi,

from normal package management systems, I am used to have "Provides"
which allows me to install any of a set of packages to satisfy a
dependency (eg. "Provides: mail-transport-agent"). I was wondering how
to best achieve a similar effect with Ansible, so I do not have to
hardwire all the role names in many places. Eg. if I want to switch
from one role that installs MySQL to one of the dozens of other roles
which do "basically" the same, I would like to just depend on a role
that provides "database-server", then decide later which database engine
I actually want by selecting one role that installs a database server
without having to go back to all the roles which are installing
applications depending on a database server to reference a different
role.

How are you guys tackling this kind of problem?


Kind regards,
Toni

-- 
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/20180813214709.xfofs4zt3kcqxls4%40spruce.office.oeko.net.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Assign a tag to a vm

2018-08-13 Thread Jonathan Lozada De La Matta
I don't think its supported at the moment with the vmware_guest module.

On Mon, Aug 13, 2018 at 4:17 PM Alain Gilbert  wrote:

> On vmware 6.5
>
>
> Le lun. 13 août 2018 à 11:58, Jonathan Lozada De La Matta <
> jloza...@redhat.com> a écrit :
>
>> well depends what cloud provider you are using. It is possible with AWS.
>> needs_info.
>>
>> On Mon, Aug 13, 2018 at 11:35 AM Alain Gilbert 
>> wrote:
>>
>>> Hi,
>>> Is there a way to assign a tags, with Ansible Playbook, to a VM ?
>>>
>>> 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/d3c78766-5ede-4400-aefd-ec8e643e1f04%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%2BLZHY%3D5r47M_u4JOA%2BphTV0KkWFxtgks14X6yo_fq6EQQ%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/CAE9vCNNikC1w2rMV8k2%2B_cxqb%2BrDihVQR7ij%3DiErZvr5sf-RnQ%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%2B%2BKgaCzede%3DYcEOdek%3DHctw_LhuBrjuePT%2BnL7JE51bQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Assign a tag to a vm

2018-08-13 Thread Alain Gilbert
On vmware 6.5


Le lun. 13 août 2018 à 11:58, Jonathan Lozada De La Matta <
jloza...@redhat.com> a écrit :

> well depends what cloud provider you are using. It is possible with AWS.
> needs_info.
>
> On Mon, Aug 13, 2018 at 11:35 AM Alain Gilbert  wrote:
>
>> Hi,
>> Is there a way to assign a tags, with Ansible Playbook, to a VM ?
>>
>> 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/d3c78766-5ede-4400-aefd-ec8e643e1f04%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%2BLZHY%3D5r47M_u4JOA%2BphTV0KkWFxtgks14X6yo_fq6EQQ%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/CAE9vCNNikC1w2rMV8k2%2B_cxqb%2BrDihVQR7ij%3DiErZvr5sf-RnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Need some help using Kerberos Authentication for Windows Target

2018-08-13 Thread Shawn Singh
Not sure of the original installation, but I've used yum to keep it updated.

I believe I've got version 18 of pip...

This is what I see when I check the version of pip...

pip -V
pip 18.0 from /usr/lib/python2.7/site-packages/pip (python 2.7)

Would you suggest doing a pip install ansible over yum install ansible?

On Sunday, August 12, 2018 at 7:14:16 AM UTC-4, J Hawkesworth wrote:
>
> I haven't seen this error before myself.
> This line in your your errors makes it look to me like there is something 
> unexpected about the underlying libs on your ansible controller.
>
> /usr/lib/python2.7/site-
> packages/winrm/transport.py:299: UserWarning: Function  HTTPKerberosAuth.__init__> does not contain optional arg force_preemptive, 
> check installed version with pip list
>
> Sometimes things get scrambled when there is a mismatch between versions 
> of libraries installed by your operating system package manager and the 
> libraries that python expects.
>
> In such cases sometimes you can fix things but uninstalling and 
> reinstalling everything.
>
> You don't mention how you installed ansible but if its from pip I'd 
> recommend upgrading pip itself to the latest version, then uninstalling and 
> reinstalling ansible.
>
> Hope this helps,
>
> Jon
>
> On Friday, August 10, 2018 at 9:01:46 PM UTC+1, Shawn Singh wrote:
>>
>> Hello,
>>
>> I've configured a Windows 2016 Server using 
>> ConfigureRemotingForAnsible.ps1 and am able to do a simple ping test using 
>> basic auth.
>>
>> Command I'm using is:
>> ansible all -i myinventory -m win_ping
>>
>> I get a pong back.
>>
>> When trying to use Kerberos, authentication ... different story:
>> My inventory looks like:
>> xjaxd11133app.csxt.ad.csx.com ansible_user=network...@csxt.ad.csx.com 
>> ansible_password=secret ansible_port=5986 ansible_winrm_transport=kerberos 
>> ansible_connection=winrm ansible_winrm_server_cert_validation=ignore
>>
>> Instead, I'm seeing:
>> ansible all -i kerbauth -m win_ping
>> /usr/lib/python2.7/site-packages/winrm/transport.py:299: UserWarning: 
>> Function  does not contain 
>> optional arg force_preemptive, check installed version with pip list
>>   % (str(function), name))
>> /usr/lib/python2.7/site-packages/winrm/transport.py:299: UserWarning: 
>> Function  does not contain 
>> optional arg delegate, check installed version with pip list
>>   % (str(function), name))
>> /usr/lib/python2.7/site-packages/winrm/transport.py:299: UserWarning: 
>> Function  does not contain 
>> optional arg send_cbt, check installed version with pip list
>>   % (str(function), name))
>> /usr/lib/python2.7/site-packages/winrm/transport.py:299: UserWarning: 
>> Function  does not contain 
>> optional arg principal, check installed version with pip list
>>   % (str(function), name))
>> /usr/lib/python2.7/site-packages/winrm/transport.py:299: UserWarning: 
>> Function  does not contain 
>> optional arg sanitize_mutual_error_response, check installed version with 
>> pip list
>>   % (str(function), name))
>> /usr/lib/python2.7/site-packages/winrm/transport.py:299: UserWarning: 
>> Function  does not contain 
>> optional arg hostname_override, check installed version with pip list
>>   % (str(function), name))
>> An exception occurred during task execution. To see the full traceback, 
>> use -vvv. The error was: MutualAuthenticationError: Unable to authenticate 
>> 
>> xjaxd11133app.csxt.ad.csx.com | FAILED! => {
>> "msg": "Unexpected failure during module execution.",
>> "stdout": ""
>> }
>>
>> For more verbose:
>>
>> [j8683@lnx30137 /home/j8683]$ ansible all -i kerbauth -m win_ping -v
>> ansible 2.6.2
>>   config file = /etc/ansible/ansible.cfg
>>   configured module search path = 
>> [u'/home/j8683/.ansible/plugins/modules', 
>> u'/usr/share/ansible/plugins/modules']
>>   ansible python module location = 
>> /usr/lib/python2.7/site-packages/ansible
>>   executable location = /usr/bin/ansible
>>   python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 
>> 20150623 (Red Hat 4.8.5-14)]
>> Using /etc/ansible/ansible.cfg as config file
>> setting up inventory plugins
>> Parsed /home/j8683/kerbauth inventory source with ini plugin
>> Loading callback plugin minimal of type stdout, v2.0 from 
>> /usr/lib/python2.7/site-packages/ansible/plugins/callback/minimal.pyc
>> META: ran handlers
>> Using module file 
>> /usr/lib/python2.7/site-packages/ansible/modules/windows/win_ping.ps1
>>  ESTABLISH WINRM CONNECTION FOR USER: 
>> network...@csxt.ad.csx.com on PORT 5986 TO xjaxd11133app.csxt.ad.csx.com
>> checking if winrm_host xjaxd11133app.csxt.ad.csx.com is an IPv6 address
>> creating Kerberos CC at /tmp/tmp8tVXsJ
>> calling kinit with subprocess for principal network...@csxt.ad.csx.com
>> kinit succeeded for principal network...@csxt.ad.csx.com
>>  WINRM CONNECT: transport=kerberos 
>> endpoint=https://xjaxd11133app.csxt.ad.csx.com:5986/wsman
>> /usr/lib/python2.7/site-packages/winrm/transport.py:299: UserWarning: 
>> Function  does not con

Re: [ansible-project] include_tasks: Unable to retrieve file contents\nCould not find or access

2018-08-13 Thread Jonathan Lozada De La Matta
so there's no way its going to find it because its a different total
directory. I don't know if the playbook file has like include_vars or
include_tasks that points to the include/ dir but, its hard to tell with
all all this directories and files. I suggest you do what I mentioned
before.

copy the find_ucp.yml to the role you are trying to use and put it on the
tasks/ dir. Then from one of the .yml files in the tasks/ dir do the
include_tasks from there.

On Mon, Aug 13, 2018 at 1:16 PM OM Nachiketa  wrote:

> https://github.com/chris7444/Docker-Synergy this is what I am trying to
> use.
>
> On Mon, Aug 13, 2018, 10:43 PM Jonathan Lozada De La Matta <
> jloza...@redhat.com> wrote:
>
>> how does your directory structure looks like? are you using a role? you
>> can add find_ucp.yml under tasks/ and when you do the include from main.yml
>> or another .yml in the same directory it should grab it easier.
>>
>> On Mon, Aug 13, 2018 at 1:10 PM OM Nachiketa 
>> wrote:
>>
>>> this line calls the task include_tasks: includes/find_ucp.yml
>>> ping_servers= "{{ groups.ucp }}"
>>>
>>> - name: check
>>>   uri:
>>> url: "https://{{ item }}.{{ domain_name }}/auth/login"
>>> headers:
>>>   Content-Type: application/json
>>> method: POST
>>> status_code: 200,500
>>> body_format: json
>>> validate_certs: no
>>> body: '{"username":"{{ ucp_username }}","password":"{{ ucp_password
>>> }}"}'
>>>   delegate_to: localhost
>>>   register: checks
>>>   failed_when: false
>>>   changed_when: false
>>>   when: checks.status !=200 and checks.status != 500
>>>   with_items: "{{ ping_servers }}"
>>>   no_log: yes
>>>
>>>
>>>
>>> On Mon, Aug 13, 2018 at 10:26 PM Jonathan Lozada De La Matta <
>>> jloza...@redhat.com> wrote:
>>>
 can you paste the tasks? hard to tell with just the errors.

 On Mon, Aug 13, 2018 at 12:55 PM OM Nachiketa 
 wrote:

> I am trying to run some tasks with variable but running in this error
> "FAILED! => {"reason": "Unable to retrieve file contents\nCould not find 
> or
> access 'path to my .yml ' on the Ansible Controller.\nIf you are using a
> module and expect the file to exist on the remote, see the remote_src
> option"}
>
>
> the task is to check and verify a response.
>
> --
> 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/b208da38-dffb-42f2-a2f1-7a62f0975c6c%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%2BnLpqpak_sKBs-oiPJnxTNmYYEE2Ej_W35e8x%3D1Dr2-w%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/CACAHGsBVH9f0G6FFrg1oBbMLn8oCLxQF8Yz48B5C%2BxReF%2BzHGg%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

Re: [ansible-project] include_tasks: Unable to retrieve file contents\nCould not find or access

2018-08-13 Thread OM Nachiketa
https://github.com/chris7444/Docker-Synergy this is what I am trying to use.

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

> how does your directory structure looks like? are you using a role? you
> can add find_ucp.yml under tasks/ and when you do the include from main.yml
> or another .yml in the same directory it should grab it easier.
>
> On Mon, Aug 13, 2018 at 1:10 PM OM Nachiketa 
> wrote:
>
>> this line calls the task include_tasks: includes/find_ucp.yml
>> ping_servers= "{{ groups.ucp }}"
>>
>> - name: check
>>   uri:
>> url: "https://{{ item }}.{{ domain_name }}/auth/login"
>> headers:
>>   Content-Type: application/json
>> method: POST
>> status_code: 200,500
>> body_format: json
>> validate_certs: no
>> body: '{"username":"{{ ucp_username }}","password":"{{ ucp_password
>> }}"}'
>>   delegate_to: localhost
>>   register: checks
>>   failed_when: false
>>   changed_when: false
>>   when: checks.status !=200 and checks.status != 500
>>   with_items: "{{ ping_servers }}"
>>   no_log: yes
>>
>>
>>
>> On Mon, Aug 13, 2018 at 10:26 PM Jonathan Lozada De La Matta <
>> jloza...@redhat.com> wrote:
>>
>>> can you paste the tasks? hard to tell with just the errors.
>>>
>>> On Mon, Aug 13, 2018 at 12:55 PM OM Nachiketa 
>>> wrote:
>>>
 I am trying to run some tasks with variable but running in this error
 "FAILED! => {"reason": "Unable to retrieve file contents\nCould not find or
 access 'path to my .yml ' on the Ansible Controller.\nIf you are using a
 module and expect the file to exist on the remote, see the remote_src
 option"}


 the task is to check and verify a response.

 --
 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/b208da38-dffb-42f2-a2f1-7a62f0975c6c%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%2BnLpqpak_sKBs-oiPJnxTNmYYEE2Ej_W35e8x%3D1Dr2-w%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/CACAHGsBVH9f0G6FFrg1oBbMLn8oCLxQF8Yz48B5C%2BxReF%2BzHGg%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%2BLLTq1FaozrbbxQz4yprFUKWXA82tYx9N8Q16LonNmC8w%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Y

Re: [ansible-project] include_tasks: Unable to retrieve file contents\nCould not find or access

2018-08-13 Thread Jonathan Lozada De La Matta
how does your directory structure looks like? are you using a role? you can
add find_ucp.yml under tasks/ and when you do the include from main.yml or
another .yml in the same directory it should grab it easier.

On Mon, Aug 13, 2018 at 1:10 PM OM Nachiketa  wrote:

> this line calls the task include_tasks: includes/find_ucp.yml
> ping_servers= "{{ groups.ucp }}"
>
> - name: check
>   uri:
> url: "https://{{ item }}.{{ domain_name }}/auth/login"
> headers:
>   Content-Type: application/json
> method: POST
> status_code: 200,500
> body_format: json
> validate_certs: no
> body: '{"username":"{{ ucp_username }}","password":"{{ ucp_password
> }}"}'
>   delegate_to: localhost
>   register: checks
>   failed_when: false
>   changed_when: false
>   when: checks.status !=200 and checks.status != 500
>   with_items: "{{ ping_servers }}"
>   no_log: yes
>
>
>
> On Mon, Aug 13, 2018 at 10:26 PM Jonathan Lozada De La Matta <
> jloza...@redhat.com> wrote:
>
>> can you paste the tasks? hard to tell with just the errors.
>>
>> On Mon, Aug 13, 2018 at 12:55 PM OM Nachiketa 
>> wrote:
>>
>>> I am trying to run some tasks with variable but running in this error
>>> "FAILED! => {"reason": "Unable to retrieve file contents\nCould not find or
>>> access 'path to my .yml ' on the Ansible Controller.\nIf you are using a
>>> module and expect the file to exist on the remote, see the remote_src
>>> option"}
>>>
>>>
>>> the task is to check and verify a response.
>>>
>>> --
>>> 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/b208da38-dffb-42f2-a2f1-7a62f0975c6c%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%2BnLpqpak_sKBs-oiPJnxTNmYYEE2Ej_W35e8x%3D1Dr2-w%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/CACAHGsBVH9f0G6FFrg1oBbMLn8oCLxQF8Yz48B5C%2BxReF%2BzHGg%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%2BLLTq1FaozrbbxQz4yprFUKWXA82tYx9N8Q16LonNmC8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] include_tasks: Unable to retrieve file contents\nCould not find or access

2018-08-13 Thread OM Nachiketa
this line calls the task include_tasks: includes/find_ucp.yml ping_servers=
"{{ groups.ucp }}"

- name: check
  uri:
url: "https://{{ item }}.{{ domain_name }}/auth/login"
headers:
  Content-Type: application/json
method: POST
status_code: 200,500
body_format: json
validate_certs: no
body: '{"username":"{{ ucp_username }}","password":"{{ ucp_password
}}"}'
  delegate_to: localhost
  register: checks
  failed_when: false
  changed_when: false
  when: checks.status !=200 and checks.status != 500
  with_items: "{{ ping_servers }}"
  no_log: yes



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

> can you paste the tasks? hard to tell with just the errors.
>
> On Mon, Aug 13, 2018 at 12:55 PM OM Nachiketa 
> wrote:
>
>> I am trying to run some tasks with variable but running in this error
>> "FAILED! => {"reason": "Unable to retrieve file contents\nCould not find or
>> access 'path to my .yml ' on the Ansible Controller.\nIf you are using a
>> module and expect the file to exist on the remote, see the remote_src
>> option"}
>>
>>
>> the task is to check and verify a response.
>>
>> --
>> 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/b208da38-dffb-42f2-a2f1-7a62f0975c6c%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%2BnLpqpak_sKBs-oiPJnxTNmYYEE2Ej_W35e8x%3D1Dr2-w%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/CACAHGsBVH9f0G6FFrg1oBbMLn8oCLxQF8Yz48B5C%2BxReF%2BzHGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] include_tasks: Unable to retrieve file contents\nCould not find or access

2018-08-13 Thread Jonathan Lozada De La Matta
can you paste the tasks? hard to tell with just the errors.

On Mon, Aug 13, 2018 at 12:55 PM OM Nachiketa 
wrote:

> I am trying to run some tasks with variable but running in this error
> "FAILED! => {"reason": "Unable to retrieve file contents\nCould not find or
> access 'path to my .yml ' on the Ansible Controller.\nIf you are using a
> module and expect the file to exist on the remote, see the remote_src
> option"}
>
>
> the task is to check and verify a response.
>
> --
> 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/b208da38-dffb-42f2-a2f1-7a62f0975c6c%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%2BnLpqpak_sKBs-oiPJnxTNmYYEE2Ej_W35e8x%3D1Dr2-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] include_tasks: Unable to retrieve file contents\nCould not find or access

2018-08-13 Thread OM Nachiketa
I am trying to run some tasks with variable but running in this error 
"FAILED! => {"reason": "Unable to retrieve file contents\nCould not find or 
access 'path to my .yml ' on the Ansible Controller.\nIf you are using a 
module and expect the file to exist on the remote, see the remote_src 
option"}


the task is to check and verify a response.

-- 
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/b208da38-dffb-42f2-a2f1-7a62f0975c6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Assign a tag to a vm

2018-08-13 Thread Jonathan Lozada De La Matta
well depends what cloud provider you are using. It is possible with AWS.
needs_info.

On Mon, Aug 13, 2018 at 11:35 AM Alain Gilbert  wrote:

> Hi,
> Is there a way to assign a tags, with Ansible Playbook, to a VM ?
>
> 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/d3c78766-5ede-4400-aefd-ec8e643e1f04%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%2BLZHY%3D5r47M_u4JOA%2BphTV0KkWFxtgks14X6yo_fq6EQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: documentation in my playbooks

2018-08-13 Thread Jonathan Lozada De La Matta
I agree with the responses in there. Besides in the tasks, there's a readme
file and other ways to have this information.

On Mon, Aug 13, 2018 at 11:09 AM 'J Hawkesworth' via Ansible Project <
ansible-project@googlegroups.com> wrote:

> Nothing implemented I believe, but see the discussion here:
>
> https://github.com/ansible/proposals/issues/19
>
> Jon
>
> On Monday, August 13, 2018 at 1:04:17 PM UTC+1, eric.b@nasa.gov wrote:
>>
>> Short question:
>>
>> Is it possible for me to leverage whatever-it-is that makes ansible-doc work
>> for my own playbooks?
>>
>> Long drawn-out question:
>>
>> So I'm fairly new to ansible.  I'm much more used to writing shell
>> scripts and/or perl scripts.  Both bash and perl have a way to create a
>> -h and/or --help flag that will generate documentation instead of
>> actually running the script.  Perl goes even further with "pod" which has a
>> program to display man-page-esque information.
>>
>> Does ansible-playbook have anything similar?  The closest I've been able
>> to figure out is something like this:
>>
>>   tasks:
>>   - name: Help message
>> block:
>> - pause:
>> prompt: |-
>>   This is a Literal Block Scalar.
>>   It will display the text
>>   exactly
>>   as   it   appears here with newlines
>>   and extra spaces.  I can use an optional minus sign to
>>   prevent a final newline.
>>
>>   Hit Return to continue
>> - fail:
>> msg: "Aborting after requesting help"
>> when: help is defined
>>   - debug:
>>   msg: "\n\nHi There from {{inventory_hostname}}\n\n"
>>
>>
>>
>> This works ... but it's a little clunky.  I have to remember to call it
>>
>> ansible-playbook -e help=1 playbook.yaml
>>
>> But I would **love** to be able to run
>>
>> ansible-doc playbook.yaml
>>
>> and have it either generate documentation (that I would, of course,
>> write) or generate an error that no documentation is available.
>>
>> Is this possible?
>>
>> --EbH
>>
> --
> 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/6d47bd89-25df-4d62-8998-ff55474206be%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%2BKVFv1RwKBR-1STLxOaOpu7OE8Sdwm1kJWP052S9i6DGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Karl Auer
Please do this:

Use the AWS EC2 Console to find out the public and private addresses of the
system you want to connect FROM. We will call this system "system A".
Please post those details here.

Use the AWS EC2 Console to find out the private and public addresses of the
system you want to connect TO. We will call this system "system B". Please
post those details here.

Regards, K.

PS: You do not need PasswordAuthentication, and you should revert any
changes you have made to ssh_config or sshd_config.

On Tue, Aug 14, 2018 at 12:07 AM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> sorry i forgot screen shot attachment
>
> On Mon, Aug 13, 2018 at 7:36 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> Even now I directly tried without being an root user but it still shows
>> the same thing . my last logged in details. but before that it may be
>> connect to the client since there were no errors shown. so now I'm
>> completely confused and tried every combination in this week. but no idea
>> what exactly is happening.
>>
>> On Mon, Aug 13, 2018 at 7:28 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> I made Changes in my sshd_config file like yes to passwordauthentication
>>> and bunch of as shown on youtube. is that problem ? because it won't be
>>> here it'll give permission errors then .
>>>
>>> On Mon, Aug 13, 2018 at 7:21 PM, Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 I'm Constantly getting this window. What is this ? sending a new screen
 shot

 On Mon, Aug 13, 2018 at 7:13 PM, Kiran Sonawane <
 kiransonawane.nm...@gmail.com> wrote:

> I mean i was loged out as root user and become normal use. I didn't
> really go to my remote machine. but I'm sending you screen shots of my cmd
> where i changed Insta_1.pen to 600 then try to shh -i  ~/.ssh/Insta_1.pem
> ubuntu@publicIP and it did the same thing as last time.
> Logged out of super user and vanished my .pen file.
> I really have no idea what's happening. please tell me what exactly
> happening, i'm doing something wrong ?
>
> Thanx You're really helping me so much.
>
> On Mon, Aug 13, 2018 at 5:16 PM, Karl Auer 
> wrote:
>
>> Look carefully at the pictures you sent me. They show, very clearly,
>> that you have successfully logged into 18.222.132.35.
>>
>> The reason you think things are "gone" is because those things exist
>> on your source system, not on your target system.
>>
>> From the command prompt "ubuntu@ip-172-31-23-215" type "exit" and
>> press return. You will find yourself back on your source system, and the
>> "missing" items will be there. They never left - you did :-)
>>
>> Regards, K.
>>
>>
>> On Mon, Aug 13, 2018 at 9:30 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> I already did that all changes, made the path on same line. Then I
>>> changed permissions to from 777 to 666
>>> Then I again changed to 400. Nothing worked. I just don't understand
>>> what's happening?
>>> All the files from /.ssh are gone. Id_rsa, Id_rsa.pub, my  .pem file
>>> config file all are not there when I automatically logged out of root.
>>>
>>> On Mon, Aug 13, 2018, 4:18 PM Karl Auer 
>>> wrote:
>>>
 Hullo again.

 Configuration files need to be copied exactly and accurately. Look
 at the config file you sent - it does not match the formatting I sent,
 unless email screwed it up. Each line - Host, Hostname, User and
 IdentityFile, must be on a separate line. The value for each keyword 
 should
 be on the same line as the keyword, separated from it by a space. It 
 looks
 to me as if the IdentityFile line has a line break in it - fix that. 
 Also -
 just for neatness, not sure it's actually necessary - indent the three
 lines after the Host line.

 Now on to your login: It looks to me as if it worked. You have
 successfully logged in to 18.222.132.35.

 I suggest you correct the permissions on Insta_1.pem (use 600
 instead of 400, but as you can see it works either way with sudo, 
 because
 root can read anything).

 What files are you saying are "all gone"? Gone from where?

 Regards, K.


 On Mon, Aug 13, 2018 at 8:25 PM, Kiran Sonawane <
 kiransonawane.nm...@gmail.com> wrote:

> I just tried what you said and it just forced log out of Superuser
> then all the copied .pem file and id_rsa.pub key all are gone It's 
> been a
> week I'm only trying to ssh from one instance to another now its 
> seems it's
> not that worth of time. I'm sanding you  screen shot. thanx
>
> On Mon, Aug 13, 2018 at 3:41

[ansible-project] Assign a tag to a vm

2018-08-13 Thread Alain Gilbert
Hi,
Is there a way to assign a tags, with Ansible Playbook, to a VM ?

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/d3c78766-5ede-4400-aefd-ec8e643e1f04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: documentation in my playbooks

2018-08-13 Thread 'J Hawkesworth' via Ansible Project
Nothing implemented I believe, but see the discussion here:

https://github.com/ansible/proposals/issues/19

Jon

On Monday, August 13, 2018 at 1:04:17 PM UTC+1, eric.b@nasa.gov wrote:
>
> Short question:
>
> Is it possible for me to leverage whatever-it-is that makes ansible-doc work 
> for my own playbooks?
>
> Long drawn-out question:
>
> So I'm fairly new to ansible.  I'm much more used to writing shell scripts 
> and/or perl scripts.  Both bash and perl have a way to create a -h and/or 
> --help flag that will generate documentation instead of actually running 
> the script.  Perl goes even further with "pod" which has a program to 
> display man-page-esque information.
>
> Does ansible-playbook have anything similar?  The closest I've been able 
> to figure out is something like this:
>
>   tasks:
>   - name: Help message
> block:
> - pause:
> prompt: |-
>   This is a Literal Block Scalar.
>   It will display the text
>   exactly
>   as   it   appears here with newlines
>   and extra spaces.  I can use an optional minus sign to
>   prevent a final newline.
>
>   Hit Return to continue
> - fail:
> msg: "Aborting after requesting help"
> when: help is defined
>   - debug:
>   msg: "\n\nHi There from {{inventory_hostname}}\n\n"
>
>
>
> This works ... but it's a little clunky.  I have to remember to call it
>
> ansible-playbook -e help=1 playbook.yaml
>
> But I would **love** to be able to run
>
> ansible-doc playbook.yaml
>
> and have it either generate documentation (that I would, of course, write) 
> or generate an error that no documentation is available.
>
> Is this possible?
>
> --EbH
>

-- 
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/6d47bd89-25df-4d62-8998-ff55474206be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Kiran Sonawane
Even now I directly tried without being an root user but it still shows the
same thing . my last logged in details. but before that it may be connect
to the client since there were no errors shown. so now I'm completely
confused and tried every combination in this week. but no idea what exactly
is happening.

On Mon, Aug 13, 2018 at 7:28 PM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> I made Changes in my sshd_config file like yes to passwordauthentication
> and bunch of as shown on youtube. is that problem ? because it won't be
> here it'll give permission errors then .
>
> On Mon, Aug 13, 2018 at 7:21 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> I'm Constantly getting this window. What is this ? sending a new screen
>> shot
>>
>> On Mon, Aug 13, 2018 at 7:13 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> I mean i was loged out as root user and become normal use. I didn't
>>> really go to my remote machine. but I'm sending you screen shots of my cmd
>>> where i changed Insta_1.pen to 600 then try to shh -i  ~/.ssh/Insta_1.pem
>>> ubuntu@publicIP and it did the same thing as last time.
>>> Logged out of super user and vanished my .pen file.
>>> I really have no idea what's happening. please tell me what exactly
>>> happening, i'm doing something wrong ?
>>>
>>> Thanx You're really helping me so much.
>>>
>>> On Mon, Aug 13, 2018 at 5:16 PM, Karl Auer 
>>> wrote:
>>>
 Look carefully at the pictures you sent me. They show, very clearly,
 that you have successfully logged into 18.222.132.35.

 The reason you think things are "gone" is because those things exist on
 your source system, not on your target system.

 From the command prompt "ubuntu@ip-172-31-23-215" type "exit" and
 press return. You will find yourself back on your source system, and the
 "missing" items will be there. They never left - you did :-)

 Regards, K.


 On Mon, Aug 13, 2018 at 9:30 PM, Kiran Sonawane <
 kiransonawane.nm...@gmail.com> wrote:

> I already did that all changes, made the path on same line. Then I
> changed permissions to from 777 to 666
> Then I again changed to 400. Nothing worked. I just don't understand
> what's happening?
> All the files from /.ssh are gone. Id_rsa, Id_rsa.pub, my  .pem file
> config file all are not there when I automatically logged out of root.
>
> On Mon, Aug 13, 2018, 4:18 PM Karl Auer  wrote:
>
>> Hullo again.
>>
>> Configuration files need to be copied exactly and accurately. Look at
>> the config file you sent - it does not match the formatting I sent, 
>> unless
>> email screwed it up. Each line - Host, Hostname, User and IdentityFile,
>> must be on a separate line. The value for each keyword should be on the
>> same line as the keyword, separated from it by a space. It looks to me as
>> if the IdentityFile line has a line break in it - fix that. Also - just 
>> for
>> neatness, not sure it's actually necessary - indent the three lines after
>> the Host line.
>>
>> Now on to your login: It looks to me as if it worked. You have
>> successfully logged in to 18.222.132.35.
>>
>> I suggest you correct the permissions on Insta_1.pem (use 600 instead
>> of 400, but as you can see it works either way with sudo, because root 
>> can
>> read anything).
>>
>> What files are you saying are "all gone"? Gone from where?
>>
>> Regards, K.
>>
>>
>> On Mon, Aug 13, 2018 at 8:25 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> I just tried what you said and it just forced log out of Superuser
>>> then all the copied .pem file and id_rsa.pub key all are gone It's been 
>>> a
>>> week I'm only trying to ssh from one instance to another now its seems 
>>> it's
>>> not that worth of time. I'm sanding you  screen shot. thanx
>>>
>>> On Mon, Aug 13, 2018 at 3:41 PM, Karl Auer 
>>> wrote:
>>>
 Test the connection first using this command:

 ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98

 If that works, then the "User" is ubuntu, the "HostName" is
 18.191.217.98, and the "IdentityFile" is  "~/.ssh/keyfile.pem".

 If you are concerned about the pem-file location, give the fully
 qualified path to it. By the way, the permissions MUST BE CORRECT on 
 the
 .pem file, or ssh will not use it. Also, be careful with spaces in the
 config file. Each keyword is followed by a space, then a value.

 Is the target system, i.e., the system you are trying to connect
 TO, an Ubuntu Linux system?
 Also, if you are using a command-line ssh, please add the argument
 "-vvv" and post the output here. Like this:

 ssh -vvv -i ~/.ssh/keyfile.pem ubuntu@18.191.217.

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Kiran Sonawane
I made Changes in my sshd_config file like yes to passwordauthentication
and bunch of as shown on youtube. is that problem ? because it won't be
here it'll give permission errors then .

On Mon, Aug 13, 2018 at 7:21 PM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> I'm Constantly getting this window. What is this ? sending a new screen
> shot
>
> On Mon, Aug 13, 2018 at 7:13 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> I mean i was loged out as root user and become normal use. I didn't
>> really go to my remote machine. but I'm sending you screen shots of my cmd
>> where i changed Insta_1.pen to 600 then try to shh -i  ~/.ssh/Insta_1.pem
>> ubuntu@publicIP and it did the same thing as last time.
>> Logged out of super user and vanished my .pen file.
>> I really have no idea what's happening. please tell me what exactly
>> happening, i'm doing something wrong ?
>>
>> Thanx You're really helping me so much.
>>
>> On Mon, Aug 13, 2018 at 5:16 PM, Karl Auer  wrote:
>>
>>> Look carefully at the pictures you sent me. They show, very clearly,
>>> that you have successfully logged into 18.222.132.35.
>>>
>>> The reason you think things are "gone" is because those things exist on
>>> your source system, not on your target system.
>>>
>>> From the command prompt "ubuntu@ip-172-31-23-215" type "exit" and press
>>> return. You will find yourself back on your source system, and the
>>> "missing" items will be there. They never left - you did :-)
>>>
>>> Regards, K.
>>>
>>>
>>> On Mon, Aug 13, 2018 at 9:30 PM, Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 I already did that all changes, made the path on same line. Then I
 changed permissions to from 777 to 666
 Then I again changed to 400. Nothing worked. I just don't understand
 what's happening?
 All the files from /.ssh are gone. Id_rsa, Id_rsa.pub, my  .pem file
 config file all are not there when I automatically logged out of root.

 On Mon, Aug 13, 2018, 4:18 PM Karl Auer  wrote:

> Hullo again.
>
> Configuration files need to be copied exactly and accurately. Look at
> the config file you sent - it does not match the formatting I sent, unless
> email screwed it up. Each line - Host, Hostname, User and IdentityFile,
> must be on a separate line. The value for each keyword should be on the
> same line as the keyword, separated from it by a space. It looks to me as
> if the IdentityFile line has a line break in it - fix that. Also - just 
> for
> neatness, not sure it's actually necessary - indent the three lines after
> the Host line.
>
> Now on to your login: It looks to me as if it worked. You have
> successfully logged in to 18.222.132.35.
>
> I suggest you correct the permissions on Insta_1.pem (use 600 instead
> of 400, but as you can see it works either way with sudo, because root can
> read anything).
>
> What files are you saying are "all gone"? Gone from where?
>
> Regards, K.
>
>
> On Mon, Aug 13, 2018 at 8:25 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> I just tried what you said and it just forced log out of Superuser
>> then all the copied .pem file and id_rsa.pub key all are gone It's been a
>> week I'm only trying to ssh from one instance to another now its seems 
>> it's
>> not that worth of time. I'm sanding you  screen shot. thanx
>>
>> On Mon, Aug 13, 2018 at 3:41 PM, Karl Auer 
>> wrote:
>>
>>> Test the connection first using this command:
>>>
>>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>>
>>> If that works, then the "User" is ubuntu, the "HostName" is
>>> 18.191.217.98, and the "IdentityFile" is  "~/.ssh/keyfile.pem".
>>>
>>> If you are concerned about the pem-file location, give the fully
>>> qualified path to it. By the way, the permissions MUST BE CORRECT on the
>>> .pem file, or ssh will not use it. Also, be careful with spaces in the
>>> config file. Each keyword is followed by a space, then a value.
>>>
>>> Is the target system, i.e., the system you are trying to connect TO,
>>> an Ubuntu Linux system?
>>> Also, if you are using a command-line ssh, please add the argument
>>> "-vvv" and post the output here. Like this:
>>>
>>> ssh -vvv -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>>
>>> Regards, K.
>>>
>>> On Mon, Aug 13, 2018 at 7:54 PM, Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 should I mention any path for IdentityFile ?

 On Mon, Aug 13, 2018 at 2:45 PM, Kiran Sonawane <
 kiransonawane.nm...@gmail.com> wrote:

> i created config file in .ssh folder but now i'm getting error
>
> /root/.ssh/config line 4: Missing argument.
>
> I'm sending you config files cat screen shot and error screen 

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Kiran Sonawane
I'm Constantly getting this window. What is this ? sending a new screen shot

On Mon, Aug 13, 2018 at 7:13 PM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> I mean i was loged out as root user and become normal use. I didn't really
> go to my remote machine. but I'm sending you screen shots of my cmd where i
> changed Insta_1.pen to 600 then try to shh -i  ~/.ssh/Insta_1.pem
> ubuntu@publicIP and it did the same thing as last time.
> Logged out of super user and vanished my .pen file.
> I really have no idea what's happening. please tell me what exactly
> happening, i'm doing something wrong ?
>
> Thanx You're really helping me so much.
>
> On Mon, Aug 13, 2018 at 5:16 PM, Karl Auer  wrote:
>
>> Look carefully at the pictures you sent me. They show, very clearly, that
>> you have successfully logged into 18.222.132.35.
>>
>> The reason you think things are "gone" is because those things exist on
>> your source system, not on your target system.
>>
>> From the command prompt "ubuntu@ip-172-31-23-215" type "exit" and press
>> return. You will find yourself back on your source system, and the
>> "missing" items will be there. They never left - you did :-)
>>
>> Regards, K.
>>
>>
>> On Mon, Aug 13, 2018 at 9:30 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> I already did that all changes, made the path on same line. Then I
>>> changed permissions to from 777 to 666
>>> Then I again changed to 400. Nothing worked. I just don't understand
>>> what's happening?
>>> All the files from /.ssh are gone. Id_rsa, Id_rsa.pub, my  .pem file
>>> config file all are not there when I automatically logged out of root.
>>>
>>> On Mon, Aug 13, 2018, 4:18 PM Karl Auer  wrote:
>>>
 Hullo again.

 Configuration files need to be copied exactly and accurately. Look at
 the config file you sent - it does not match the formatting I sent, unless
 email screwed it up. Each line - Host, Hostname, User and IdentityFile,
 must be on a separate line. The value for each keyword should be on the
 same line as the keyword, separated from it by a space. It looks to me as
 if the IdentityFile line has a line break in it - fix that. Also - just for
 neatness, not sure it's actually necessary - indent the three lines after
 the Host line.

 Now on to your login: It looks to me as if it worked. You have
 successfully logged in to 18.222.132.35.

 I suggest you correct the permissions on Insta_1.pem (use 600 instead
 of 400, but as you can see it works either way with sudo, because root can
 read anything).

 What files are you saying are "all gone"? Gone from where?

 Regards, K.


 On Mon, Aug 13, 2018 at 8:25 PM, Kiran Sonawane <
 kiransonawane.nm...@gmail.com> wrote:

> I just tried what you said and it just forced log out of Superuser
> then all the copied .pem file and id_rsa.pub key all are gone It's been a
> week I'm only trying to ssh from one instance to another now its seems 
> it's
> not that worth of time. I'm sanding you  screen shot. thanx
>
> On Mon, Aug 13, 2018 at 3:41 PM, Karl Auer 
> wrote:
>
>> Test the connection first using this command:
>>
>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>
>> If that works, then the "User" is ubuntu, the "HostName" is
>> 18.191.217.98, and the "IdentityFile" is  "~/.ssh/keyfile.pem".
>>
>> If you are concerned about the pem-file location, give the fully
>> qualified path to it. By the way, the permissions MUST BE CORRECT on the
>> .pem file, or ssh will not use it. Also, be careful with spaces in the
>> config file. Each keyword is followed by a space, then a value.
>>
>> Is the target system, i.e., the system you are trying to connect TO,
>> an Ubuntu Linux system?
>> Also, if you are using a command-line ssh, please add the argument
>> "-vvv" and post the output here. Like this:
>>
>> ssh -vvv -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>
>> Regards, K.
>>
>> On Mon, Aug 13, 2018 at 7:54 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> should I mention any path for IdentityFile ?
>>>
>>> On Mon, Aug 13, 2018 at 2:45 PM, Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 i created config file in .ssh folder but now i'm getting error

 /root/.ssh/config line 4: Missing argument.

 I'm sending you config files cat screen shot and error screen shot


 thanx in advance

 On Mon, Aug 13, 2018 at 1:59 PM, Karl Auer 
 wrote:

> I didn't notice your attachment, sorry.
>
> The attachment indicates that you are not specifying the private
> key!
>
> Copy the key (that you downloaded when you created the instance)
> into ~/.ssh. Set i

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Kiran Sonawane
I mean i was loged out as root user and become normal use. I didn't really
go to my remote machine. but I'm sending you screen shots of my cmd where i
changed Insta_1.pen to 600 then try to shh -i  ~/.ssh/Insta_1.pem
ubuntu@publicIP and it did the same thing as last time.
Logged out of super user and vanished my .pen file.
I really have no idea what's happening. please tell me what exactly
happening, i'm doing something wrong ?

Thanx You're really helping me so much.

On Mon, Aug 13, 2018 at 5:16 PM, Karl Auer  wrote:

> Look carefully at the pictures you sent me. They show, very clearly, that
> you have successfully logged into 18.222.132.35.
>
> The reason you think things are "gone" is because those things exist on
> your source system, not on your target system.
>
> From the command prompt "ubuntu@ip-172-31-23-215" type "exit" and press
> return. You will find yourself back on your source system, and the
> "missing" items will be there. They never left - you did :-)
>
> Regards, K.
>
>
> On Mon, Aug 13, 2018 at 9:30 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> I already did that all changes, made the path on same line. Then I
>> changed permissions to from 777 to 666
>> Then I again changed to 400. Nothing worked. I just don't understand
>> what's happening?
>> All the files from /.ssh are gone. Id_rsa, Id_rsa.pub, my  .pem file
>> config file all are not there when I automatically logged out of root.
>>
>> On Mon, Aug 13, 2018, 4:18 PM Karl Auer  wrote:
>>
>>> Hullo again.
>>>
>>> Configuration files need to be copied exactly and accurately. Look at
>>> the config file you sent - it does not match the formatting I sent, unless
>>> email screwed it up. Each line - Host, Hostname, User and IdentityFile,
>>> must be on a separate line. The value for each keyword should be on the
>>> same line as the keyword, separated from it by a space. It looks to me as
>>> if the IdentityFile line has a line break in it - fix that. Also - just for
>>> neatness, not sure it's actually necessary - indent the three lines after
>>> the Host line.
>>>
>>> Now on to your login: It looks to me as if it worked. You have
>>> successfully logged in to 18.222.132.35.
>>>
>>> I suggest you correct the permissions on Insta_1.pem (use 600 instead of
>>> 400, but as you can see it works either way with sudo, because root can
>>> read anything).
>>>
>>> What files are you saying are "all gone"? Gone from where?
>>>
>>> Regards, K.
>>>
>>>
>>> On Mon, Aug 13, 2018 at 8:25 PM, Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 I just tried what you said and it just forced log out of Superuser then
 all the copied .pem file and id_rsa.pub key all are gone It's been a week
 I'm only trying to ssh from one instance to another now its seems it's not
 that worth of time. I'm sanding you  screen shot. thanx

 On Mon, Aug 13, 2018 at 3:41 PM, Karl Auer 
 wrote:

> Test the connection first using this command:
>
> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>
> If that works, then the "User" is ubuntu, the "HostName" is
> 18.191.217.98, and the "IdentityFile" is  "~/.ssh/keyfile.pem".
>
> If you are concerned about the pem-file location, give the fully
> qualified path to it. By the way, the permissions MUST BE CORRECT on the
> .pem file, or ssh will not use it. Also, be careful with spaces in the
> config file. Each keyword is followed by a space, then a value.
>
> Is the target system, i.e., the system you are trying to connect TO,
> an Ubuntu Linux system?
> Also, if you are using a command-line ssh, please add the argument
> "-vvv" and post the output here. Like this:
>
> ssh -vvv -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>
> Regards, K.
>
> On Mon, Aug 13, 2018 at 7:54 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> should I mention any path for IdentityFile ?
>>
>> On Mon, Aug 13, 2018 at 2:45 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> i created config file in .ssh folder but now i'm getting error
>>>
>>> /root/.ssh/config line 4: Missing argument.
>>>
>>> I'm sending you config files cat screen shot and error screen shot
>>>
>>>
>>> thanx in advance
>>>
>>> On Mon, Aug 13, 2018 at 1:59 PM, Karl Auer 
>>> wrote:
>>>
 I didn't notice your attachment, sorry.

 The attachment indicates that you are not specifying the private
 key!

 Copy the key (that you downloaded when you created the instance)
 into ~/.ssh. Set it's permissions to "-rw---":

 cp /path/to/downloaded/keyfile.pem ~/.ssh
 chmod u=rw,go= ~/.ssh/keyfile.pem
 Then specify the key when connecting:

 ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98

 You can make life simpler by creatin

Re: [ansible-project] documentation in my playbooks

2018-08-13 Thread Jonathan Lozada De La Matta
Eric,

The best way to write documentation on the tasks is by describing it in -
name: "here is everything i'm doing in this tasks and I can include "{{
variables }}" if I want".  I suggest the description you have in the prompt
to put it in the - name. Then every task you do will have a -name and just
be describe there whatever you are doing. If you want you can point to the
module documentation in - name or do like other scripts and use  a lot of
# and put more information. I wouldn't recommend what you are trying to
do.

On Mon, Aug 13, 2018 at 8:04 AM  wrote:

> Short question:
>
> Is it possible for me to leverage whatever-it-is that makes ansible-doc work
> for my own playbooks?
>
> Long drawn-out question:
>
> So I'm fairly new to ansible.  I'm much more used to writing shell scripts
> and/or perl scripts.  Both bash and perl have a way to create a -h and/or
> --help flag that will generate documentation instead of actually running
> the script.  Perl goes even further with "pod" which has a program to
> display man-page-esque information.
>
> Does ansible-playbook have anything similar?  The closest I've been able
> to figure out is something like this:
>
>   tasks:
>   - name: Help message
> block:
> - pause:
> prompt: |-
>   This is a Literal Block Scalar.
>   It will display the text
>   exactly
>   as   it   appears here with newlines
>   and extra spaces.  I can use an optional minus sign to
>   prevent a final newline.
>
>   Hit Return to continue
> - fail:
> msg: "Aborting after requesting help"
> when: help is defined
>   - debug:
>   msg: "\n\nHi There from {{inventory_hostname}}\n\n"
>
>
>
> This works ... but it's a little clunky.  I have to remember to call it
>
> ansible-playbook -e help=1 playbook.yaml
>
> But I would **love** to be able to run
>
> ansible-doc playbook.yaml
>
> and have it either generate documentation (that I would, of course, write)
> or generate an error that no documentation is available.
>
> Is this possible?
>
> --EbH
>
> --
> 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/28412c42-bbd7-4d2b-8c67-db3b5b652f7c%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%2BSM_jCAKM7Tvv4BzvtdFPz2ifKeu2TV99YMXYDvu8EKQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] documentation in my playbooks

2018-08-13 Thread eric . b . hymowitz
Short question:

Is it possible for me to leverage whatever-it-is that makes ansible-doc work 
for my own playbooks?

Long drawn-out question:

So I'm fairly new to ansible.  I'm much more used to writing shell scripts 
and/or perl scripts.  Both bash and perl have a way to create a -h and/or 
--help flag that will generate documentation instead of actually running 
the script.  Perl goes even further with "pod" which has a program to 
display man-page-esque information.

Does ansible-playbook have anything similar?  The closest I've been able to 
figure out is something like this:

  tasks:
  - name: Help message
block:
- pause:
prompt: |-
  This is a Literal Block Scalar.
  It will display the text
  exactly
  as   it   appears here with newlines
  and extra spaces.  I can use an optional minus sign to
  prevent a final newline.

  Hit Return to continue
- fail:
msg: "Aborting after requesting help"
when: help is defined
  - debug:
  msg: "\n\nHi There from {{inventory_hostname}}\n\n"



This works ... but it's a little clunky.  I have to remember to call it

ansible-playbook -e help=1 playbook.yaml

But I would **love** to be able to run

ansible-doc playbook.yaml

and have it either generate documentation (that I would, of course, write) 
or generate an error that no documentation is available.

Is this possible?

--EbH

-- 
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/28412c42-bbd7-4d2b-8c67-db3b5b652f7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Karl Auer
Look carefully at the pictures you sent me. They show, very clearly, that
you have successfully logged into 18.222.132.35.

The reason you think things are "gone" is because those things exist on
your source system, not on your target system.

>From the command prompt "ubuntu@ip-172-31-23-215" type "exit" and press
return. You will find yourself back on your source system, and the
"missing" items will be there. They never left - you did :-)

Regards, K.


On Mon, Aug 13, 2018 at 9:30 PM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> I already did that all changes, made the path on same line. Then I changed
> permissions to from 777 to 666
> Then I again changed to 400. Nothing worked. I just don't understand
> what's happening?
> All the files from /.ssh are gone. Id_rsa, Id_rsa.pub, my  .pem file
> config file all are not there when I automatically logged out of root.
>
> On Mon, Aug 13, 2018, 4:18 PM Karl Auer  wrote:
>
>> Hullo again.
>>
>> Configuration files need to be copied exactly and accurately. Look at the
>> config file you sent - it does not match the formatting I sent, unless
>> email screwed it up. Each line - Host, Hostname, User and IdentityFile,
>> must be on a separate line. The value for each keyword should be on the
>> same line as the keyword, separated from it by a space. It looks to me as
>> if the IdentityFile line has a line break in it - fix that. Also - just for
>> neatness, not sure it's actually necessary - indent the three lines after
>> the Host line.
>>
>> Now on to your login: It looks to me as if it worked. You have
>> successfully logged in to 18.222.132.35.
>>
>> I suggest you correct the permissions on Insta_1.pem (use 600 instead of
>> 400, but as you can see it works either way with sudo, because root can
>> read anything).
>>
>> What files are you saying are "all gone"? Gone from where?
>>
>> Regards, K.
>>
>>
>> On Mon, Aug 13, 2018 at 8:25 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> I just tried what you said and it just forced log out of Superuser then
>>> all the copied .pem file and id_rsa.pub key all are gone It's been a week
>>> I'm only trying to ssh from one instance to another now its seems it's not
>>> that worth of time. I'm sanding you  screen shot. thanx
>>>
>>> On Mon, Aug 13, 2018 at 3:41 PM, Karl Auer 
>>> wrote:
>>>
 Test the connection first using this command:

 ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98

 If that works, then the "User" is ubuntu, the "HostName" is
 18.191.217.98, and the "IdentityFile" is  "~/.ssh/keyfile.pem".

 If you are concerned about the pem-file location, give the fully
 qualified path to it. By the way, the permissions MUST BE CORRECT on the
 .pem file, or ssh will not use it. Also, be careful with spaces in the
 config file. Each keyword is followed by a space, then a value.

 Is the target system, i.e., the system you are trying to connect TO, an
 Ubuntu Linux system?
 Also, if you are using a command-line ssh, please add the argument
 "-vvv" and post the output here. Like this:

 ssh -vvv -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98

 Regards, K.

 On Mon, Aug 13, 2018 at 7:54 PM, Kiran Sonawane <
 kiransonawane.nm...@gmail.com> wrote:

> should I mention any path for IdentityFile ?
>
> On Mon, Aug 13, 2018 at 2:45 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> i created config file in .ssh folder but now i'm getting error
>>
>> /root/.ssh/config line 4: Missing argument.
>>
>> I'm sending you config files cat screen shot and error screen shot
>>
>>
>> thanx in advance
>>
>> On Mon, Aug 13, 2018 at 1:59 PM, Karl Auer 
>> wrote:
>>
>>> I didn't notice your attachment, sorry.
>>>
>>> The attachment indicates that you are not specifying the private key!
>>>
>>> Copy the key (that you downloaded when you created the instance)
>>> into ~/.ssh. Set it's permissions to "-rw---":
>>>
>>> cp /path/to/downloaded/keyfile.pem ~/.ssh
>>> chmod u=rw,go= ~/.ssh/keyfile.pem
>>> Then specify the key when connecting:
>>>
>>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>>
>>> You can make life simpler by creating a file called ~/.ssh/config
>>> and putting this in it:
>>>
>>> Host myhost
>>> HostName 18.191.217.98
>>> User ubuntu
>>> IdentityFile ~/.ssh/keyfile.pem
>>>
>>> Then you can just say:
>>>
>>> ssh myhost
>>>
>>> Obviously replace "myhost" with whatever name you prefer, and "
>>> keyfile.pem" with the actual name of the private key file.
>>>
>>> Setting up putty takes longer, partly because you have to convert
>>> the private key, but once set up it's just point and click to connect.
>>>
>>> Regards, K.
>>>
>>>
>>>
>>> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sona

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Kiran Sonawane
I already did that all changes, made the path on same line. Then I changed
permissions to from 777 to 666
Then I again changed to 400. Nothing worked. I just don't understand what's
happening?
All the files from /.ssh are gone. Id_rsa, Id_rsa.pub, my  .pem file config
file all are not there when I automatically logged out of root.

On Mon, Aug 13, 2018, 4:18 PM Karl Auer  wrote:

> Hullo again.
>
> Configuration files need to be copied exactly and accurately. Look at the
> config file you sent - it does not match the formatting I sent, unless
> email screwed it up. Each line - Host, Hostname, User and IdentityFile,
> must be on a separate line. The value for each keyword should be on the
> same line as the keyword, separated from it by a space. It looks to me as
> if the IdentityFile line has a line break in it - fix that. Also - just for
> neatness, not sure it's actually necessary - indent the three lines after
> the Host line.
>
> Now on to your login: It looks to me as if it worked. You have
> successfully logged in to 18.222.132.35.
>
> I suggest you correct the permissions on Insta_1.pem (use 600 instead of
> 400, but as you can see it works either way with sudo, because root can
> read anything).
>
> What files are you saying are "all gone"? Gone from where?
>
> Regards, K.
>
>
> On Mon, Aug 13, 2018 at 8:25 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> I just tried what you said and it just forced log out of Superuser then
>> all the copied .pem file and id_rsa.pub key all are gone It's been a week
>> I'm only trying to ssh from one instance to another now its seems it's not
>> that worth of time. I'm sanding you  screen shot. thanx
>>
>> On Mon, Aug 13, 2018 at 3:41 PM, Karl Auer  wrote:
>>
>>> Test the connection first using this command:
>>>
>>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>>
>>> If that works, then the "User" is ubuntu, the "HostName" is
>>> 18.191.217.98, and the "IdentityFile" is  "~/.ssh/keyfile.pem".
>>>
>>> If you are concerned about the pem-file location, give the fully
>>> qualified path to it. By the way, the permissions MUST BE CORRECT on the
>>> .pem file, or ssh will not use it. Also, be careful with spaces in the
>>> config file. Each keyword is followed by a space, then a value.
>>>
>>> Is the target system, i.e., the system you are trying to connect TO, an
>>> Ubuntu Linux system?
>>> Also, if you are using a command-line ssh, please add the argument
>>> "-vvv" and post the output here. Like this:
>>>
>>> ssh -vvv -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>>
>>> Regards, K.
>>>
>>> On Mon, Aug 13, 2018 at 7:54 PM, Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 should I mention any path for IdentityFile ?

 On Mon, Aug 13, 2018 at 2:45 PM, Kiran Sonawane <
 kiransonawane.nm...@gmail.com> wrote:

> i created config file in .ssh folder but now i'm getting error
>
> /root/.ssh/config line 4: Missing argument.
>
> I'm sending you config files cat screen shot and error screen shot
>
>
> thanx in advance
>
> On Mon, Aug 13, 2018 at 1:59 PM, Karl Auer 
> wrote:
>
>> I didn't notice your attachment, sorry.
>>
>> The attachment indicates that you are not specifying the private key!
>>
>> Copy the key (that you downloaded when you created the instance) into
>> ~/.ssh. Set it's permissions to "-rw---":
>>
>> cp /path/to/downloaded/keyfile.pem ~/.ssh
>> chmod u=rw,go= ~/.ssh/keyfile.pem
>> Then specify the key when connecting:
>>
>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>
>> You can make life simpler by creating a file called ~/.ssh/config and
>> putting this in it:
>>
>> Host myhost
>> HostName 18.191.217.98
>> User ubuntu
>> IdentityFile ~/.ssh/keyfile.pem
>>
>> Then you can just say:
>>
>> ssh myhost
>>
>> Obviously replace "myhost" with whatever name you prefer, and "
>> keyfile.pem" with the actual name of the private key file.
>>
>> Setting up putty takes longer, partly because you have to convert the
>> private key, but once set up it's just point and click to connect.
>>
>> Regards, K.
>>
>>
>>
>> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> now I tried connection ec2 instance from putty. then i followed all
>>> the steps in all videos on youtube its giving the following error.
>>>
>>> (ECDSA) to the list of known hosts.
>>> Permission denied (publickey).
>>>
>>>
>>> On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
>>> jloza...@redhat.com> wrote:
>>>
 Kiran,

 Your issue seems to be more an issue about connecting right to the
 aws vm than ansible. Did you create the keys, downloaded them, ssh-add 
 and
 connecting as the right user? are you usin

[ansible-project] Synchronize module host access has a different behaviour from other modules

2018-08-13 Thread Tim Coote
I don't know whether this is deliberate or not, but I cannot get the 
synchronize module to route to my computers, when all other modules are 
content.

All of the controlled hosts are behind firewalls that I do not control, so 
access is via a reverse ssh tunnel. The inventory file has entries like 
this:

`host_1234 ansible_host=localhost:1234 ansible_user=username 
host_key_checking=false`

the ansible_ssh_common_args are set in group_vars/all as:

`ansible_ssh_common_args: '-o StrictHostKeyChecking=no -o ProxyCommand="ssh 
-W %h: -q jumphost"'`

where `jumphost` is where the controlled computers log into and set up 
reverse ssh proxies.

Commands such as:
`ansible ping -i hosts host_1234 -m ping
host_1234 | SUCCESS => {
"changed": false, 
"ping": "pong"
}`

work as expected. However, the embedded rsync command in the synchronize 
module cannot resolve to the target host. It constructs the wrong rsync 
command:
`ansible -vvv -i hostfile host_1234 -m synchronize -a 
"src=/var/log/daemon.log dest=daemon"`, creates:

`/usr/bin/rsync --delay-updates -F --compress --archive --rsh=/usr/bin/ssh 
-S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null 
--out-format=<>%i %n%L /var/log/daemon.log 
[username@localhost:1234]:daemon`

A working rsync command is:
`rsync -avz -e "ssh -A jumphost ssh -p 1234" 
username@localhost:/var/log/daemon.log daemon/`

Is this a bug or a missing feature?  Is the issue with ansible's parameter 
construction, or synchronize's use of them?

Tim



-- 
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/fb996cf1-ce70-4214-b8bb-cc738ec78733%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Karl Auer
I don't think it "logged you out of superuser" - I think it logged you into
the remote system :-)

On Mon, Aug 13, 2018 at 8:25 PM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> I just tried what you said and it just forced log out of Superuser then
> all the copied .pem file and id_rsa.pub key all are gone It's been a week
> I'm only trying to ssh from one instance to another now its seems it's not
> that worth of time. I'm sanding you  screen shot. thanx
>
> On Mon, Aug 13, 2018 at 3:41 PM, Karl Auer  wrote:
>
>> Test the connection first using this command:
>>
>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>
>> If that works, then the "User" is ubuntu, the "HostName" is 18.191.217.98,
>> and the "IdentityFile" is  "~/.ssh/keyfile.pem".
>>
>> If you are concerned about the pem-file location, give the fully
>> qualified path to it. By the way, the permissions MUST BE CORRECT on the
>> .pem file, or ssh will not use it. Also, be careful with spaces in the
>> config file. Each keyword is followed by a space, then a value.
>>
>> Is the target system, i.e., the system you are trying to connect TO, an
>> Ubuntu Linux system?
>> Also, if you are using a command-line ssh, please add the argument "-vvv"
>> and post the output here. Like this:
>>
>> ssh -vvv -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>
>> Regards, K.
>>
>> On Mon, Aug 13, 2018 at 7:54 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> should I mention any path for IdentityFile ?
>>>
>>> On Mon, Aug 13, 2018 at 2:45 PM, Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 i created config file in .ssh folder but now i'm getting error

 /root/.ssh/config line 4: Missing argument.

 I'm sending you config files cat screen shot and error screen shot


 thanx in advance

 On Mon, Aug 13, 2018 at 1:59 PM, Karl Auer 
 wrote:

> I didn't notice your attachment, sorry.
>
> The attachment indicates that you are not specifying the private key!
>
> Copy the key (that you downloaded when you created the instance) into
> ~/.ssh. Set it's permissions to "-rw---":
>
> cp /path/to/downloaded/keyfile.pem ~/.ssh
> chmod u=rw,go= ~/.ssh/keyfile.pem
> Then specify the key when connecting:
>
> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>
> You can make life simpler by creating a file called ~/.ssh/config and
> putting this in it:
>
> Host myhost
> HostName 18.191.217.98
> User ubuntu
> IdentityFile ~/.ssh/keyfile.pem
>
> Then you can just say:
>
> ssh myhost
>
> Obviously replace "myhost" with whatever name you prefer, and "
> keyfile.pem" with the actual name of the private key file.
>
> Setting up putty takes longer, partly because you have to convert the
> private key, but once set up it's just point and click to connect.
>
> Regards, K.
>
>
>
> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> now I tried connection ec2 instance from putty. then i followed all
>> the steps in all videos on youtube its giving the following error.
>>
>> (ECDSA) to the list of known hosts.
>> Permission denied (publickey).
>>
>>
>> On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
>> jloza...@redhat.com> wrote:
>>
>>> Kiran,
>>>
>>> Your issue seems to be more an issue about connecting right to the
>>> aws vm than ansible. Did you create the keys, downloaded them, ssh-add 
>>> and
>>> connecting as the right user? are you using -K and escalating correctly?
>>>
>>> On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 I have free account so only default instances can be created but I
 changed Root Password To Root before starting so there should not be
 permission issue but it gives me an permission issue.

 On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G
 wrote:
>
> Hi,
>
> /dev/sda is reserved for root.
>
> Please try below...
>
> # Single instance with ssd gp2 root volume
> - ec2:
> key_name: mykey
> group: webserver
> instance_type: c3.medium
> image: ami-123456
> wait: yes
> wait_timeout: 500
> volumes:
>   - device_name: /dev/xvda
> volume_type: gp2
> volume_size: 8
> vpc_subnet_id: subnet-29e63245
> assign_public_ip: yes
> count_tag:
>   Name: dbserver
> exact_count: 1
>
>
>
> On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso, 
> wrote:
>
>> I am trying to use the ec2_instance module to 

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Karl Auer
Hullo again.

Configuration files need to be copied exactly and accurately. Look at the
config file you sent - it does not match the formatting I sent, unless
email screwed it up. Each line - Host, Hostname, User and IdentityFile,
must be on a separate line. The value for each keyword should be on the
same line as the keyword, separated from it by a space. It looks to me as
if the IdentityFile line has a line break in it - fix that. Also - just for
neatness, not sure it's actually necessary - indent the three lines after
the Host line.

Now on to your login: It looks to me as if it worked. You have successfully
logged in to 18.222.132.35.

I suggest you correct the permissions on Insta_1.pem (use 600 instead of
400, but as you can see it works either way with sudo, because root can
read anything).

What files are you saying are "all gone"? Gone from where?

Regards, K.


On Mon, Aug 13, 2018 at 8:25 PM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> I just tried what you said and it just forced log out of Superuser then
> all the copied .pem file and id_rsa.pub key all are gone It's been a week
> I'm only trying to ssh from one instance to another now its seems it's not
> that worth of time. I'm sanding you  screen shot. thanx
>
> On Mon, Aug 13, 2018 at 3:41 PM, Karl Auer  wrote:
>
>> Test the connection first using this command:
>>
>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>
>> If that works, then the "User" is ubuntu, the "HostName" is 18.191.217.98,
>> and the "IdentityFile" is  "~/.ssh/keyfile.pem".
>>
>> If you are concerned about the pem-file location, give the fully
>> qualified path to it. By the way, the permissions MUST BE CORRECT on the
>> .pem file, or ssh will not use it. Also, be careful with spaces in the
>> config file. Each keyword is followed by a space, then a value.
>>
>> Is the target system, i.e., the system you are trying to connect TO, an
>> Ubuntu Linux system?
>> Also, if you are using a command-line ssh, please add the argument "-vvv"
>> and post the output here. Like this:
>>
>> ssh -vvv -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>
>> Regards, K.
>>
>> On Mon, Aug 13, 2018 at 7:54 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> should I mention any path for IdentityFile ?
>>>
>>> On Mon, Aug 13, 2018 at 2:45 PM, Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 i created config file in .ssh folder but now i'm getting error

 /root/.ssh/config line 4: Missing argument.

 I'm sending you config files cat screen shot and error screen shot


 thanx in advance

 On Mon, Aug 13, 2018 at 1:59 PM, Karl Auer 
 wrote:

> I didn't notice your attachment, sorry.
>
> The attachment indicates that you are not specifying the private key!
>
> Copy the key (that you downloaded when you created the instance) into
> ~/.ssh. Set it's permissions to "-rw---":
>
> cp /path/to/downloaded/keyfile.pem ~/.ssh
> chmod u=rw,go= ~/.ssh/keyfile.pem
> Then specify the key when connecting:
>
> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>
> You can make life simpler by creating a file called ~/.ssh/config and
> putting this in it:
>
> Host myhost
> HostName 18.191.217.98
> User ubuntu
> IdentityFile ~/.ssh/keyfile.pem
>
> Then you can just say:
>
> ssh myhost
>
> Obviously replace "myhost" with whatever name you prefer, and "
> keyfile.pem" with the actual name of the private key file.
>
> Setting up putty takes longer, partly because you have to convert the
> private key, but once set up it's just point and click to connect.
>
> Regards, K.
>
>
>
> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> now I tried connection ec2 instance from putty. then i followed all
>> the steps in all videos on youtube its giving the following error.
>>
>> (ECDSA) to the list of known hosts.
>> Permission denied (publickey).
>>
>>
>> On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
>> jloza...@redhat.com> wrote:
>>
>>> Kiran,
>>>
>>> Your issue seems to be more an issue about connecting right to the
>>> aws vm than ansible. Did you create the keys, downloaded them, ssh-add 
>>> and
>>> connecting as the right user? are you using -K and escalating correctly?
>>>
>>> On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 I have free account so only default instances can be created but I
 changed Root Password To Root before starting so there should not be
 permission issue but it gives me an permission issue.

 On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G
 wrote:
>
> Hi,
>
> /dev/sda is reserved 

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Karl Auer
Test the connection first using this command:

ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98

If that works, then the "User" is ubuntu, the "HostName" is 18.191.217.98,
and the "IdentityFile" is  "~/.ssh/keyfile.pem".

If you are concerned about the pem-file location, give the fully qualified
path to it. By the way, the permissions MUST BE CORRECT on the .pem file,
or ssh will not use it. Also, be careful with spaces in the config file.
Each keyword is followed by a space, then a value.

Is the target system, i.e., the system you are trying to connect TO, an
Ubuntu Linux system?
Also, if you are using a command-line ssh, please add the argument "-vvv"
and post the output here. Like this:

ssh -vvv -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98

Regards, K.

On Mon, Aug 13, 2018 at 7:54 PM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> should I mention any path for IdentityFile ?
>
> On Mon, Aug 13, 2018 at 2:45 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> i created config file in .ssh folder but now i'm getting error
>>
>> /root/.ssh/config line 4: Missing argument.
>>
>> I'm sending you config files cat screen shot and error screen shot
>>
>>
>> thanx in advance
>>
>> On Mon, Aug 13, 2018 at 1:59 PM, Karl Auer  wrote:
>>
>>> I didn't notice your attachment, sorry.
>>>
>>> The attachment indicates that you are not specifying the private key!
>>>
>>> Copy the key (that you downloaded when you created the instance) into
>>> ~/.ssh. Set it's permissions to "-rw---":
>>>
>>> cp /path/to/downloaded/keyfile.pem ~/.ssh
>>> chmod u=rw,go= ~/.ssh/keyfile.pem
>>> Then specify the key when connecting:
>>>
>>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>>
>>> You can make life simpler by creating a file called ~/.ssh/config and
>>> putting this in it:
>>>
>>> Host myhost
>>> HostName 18.191.217.98
>>> User ubuntu
>>> IdentityFile ~/.ssh/keyfile.pem
>>>
>>> Then you can just say:
>>>
>>> ssh myhost
>>>
>>> Obviously replace "myhost" with whatever name you prefer, and "
>>> keyfile.pem" with the actual name of the private key file.
>>>
>>> Setting up putty takes longer, partly because you have to convert the
>>> private key, but once set up it's just point and click to connect.
>>>
>>> Regards, K.
>>>
>>>
>>>
>>> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 now I tried connection ec2 instance from putty. then i followed all the
 steps in all videos on youtube its giving the following error.

 (ECDSA) to the list of known hosts.
 Permission denied (publickey).


 On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
 jloza...@redhat.com> wrote:

> Kiran,
>
> Your issue seems to be more an issue about connecting right to the aws
> vm than ansible. Did you create the keys, downloaded them, ssh-add and
> connecting as the right user? are you using -K and escalating correctly?
>
> On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> I have free account so only default instances can be created but I
>> changed Root Password To Root before starting so there should not be
>> permission issue but it gives me an permission issue.
>>
>> On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G wrote:
>>>
>>> Hi,
>>>
>>> /dev/sda is reserved for root.
>>>
>>> Please try below...
>>>
>>> # Single instance with ssd gp2 root volume
>>> - ec2:
>>> key_name: mykey
>>> group: webserver
>>> instance_type: c3.medium
>>> image: ami-123456
>>> wait: yes
>>> wait_timeout: 500
>>> volumes:
>>>   - device_name: /dev/xvda
>>> volume_type: gp2
>>> volume_size: 8
>>> vpc_subnet_id: subnet-29e63245
>>> assign_public_ip: yes
>>> count_tag:
>>>   Name: dbserver
>>> exact_count: 1
>>>
>>>
>>>
>>> On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso, 
>>> wrote:
>>>
 I am trying to use the ec2_instance module to create an ec2
 instance.  When using the ec2 module to configure a volume one would do
 something like this:

 volumes:
   - device_name: /dev/sda1
 volume_type: gp2
 volume_size: 50

 With ec2_instance I am not sure how to set the values.

 In the description it says:

 A list of block device mappings, by default this will always use
 the AMI root device so the volumes option is primarily for adding more
 storage.
 A mapping contains the (optional) keys device_name, virtual_name,
 ebs.device_type, ebs.device_size, ebs.kms_key_id, ebs.iops, and
 ebs.delete_on_termination.

 Please let me know how I would set the info from above example
 using the ec2_

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Kiran Sonawane
should I mention any path for IdentityFile ?

On Mon, Aug 13, 2018 at 2:45 PM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> i created config file in .ssh folder but now i'm getting error
>
> /root/.ssh/config line 4: Missing argument.
>
> I'm sending you config files cat screen shot and error screen shot
>
>
> thanx in advance
>
> On Mon, Aug 13, 2018 at 1:59 PM, Karl Auer  wrote:
>
>> I didn't notice your attachment, sorry.
>>
>> The attachment indicates that you are not specifying the private key!
>>
>> Copy the key (that you downloaded when you created the instance) into
>> ~/.ssh. Set it's permissions to "-rw---":
>>
>> cp /path/to/downloaded/keyfile.pem ~/.ssh
>> chmod u=rw,go= ~/.ssh/keyfile.pem
>> Then specify the key when connecting:
>>
>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>
>> You can make life simpler by creating a file called ~/.ssh/config and
>> putting this in it:
>>
>> Host myhost
>> HostName 18.191.217.98
>> User ubuntu
>> IdentityFile ~/.ssh/keyfile.pem
>>
>> Then you can just say:
>>
>> ssh myhost
>>
>> Obviously replace "myhost" with whatever name you prefer, and "
>> keyfile.pem" with the actual name of the private key file.
>>
>> Setting up putty takes longer, partly because you have to convert the
>> private key, but once set up it's just point and click to connect.
>>
>> Regards, K.
>>
>>
>>
>> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> now I tried connection ec2 instance from putty. then i followed all the
>>> steps in all videos on youtube its giving the following error.
>>>
>>> (ECDSA) to the list of known hosts.
>>> Permission denied (publickey).
>>>
>>>
>>> On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
>>> jloza...@redhat.com> wrote:
>>>
 Kiran,

 Your issue seems to be more an issue about connecting right to the aws
 vm than ansible. Did you create the keys, downloaded them, ssh-add and
 connecting as the right user? are you using -K and escalating correctly?

 On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
 kiransonawane.nm...@gmail.com> wrote:

> I have free account so only default instances can be created but I
> changed Root Password To Root before starting so there should not be
> permission issue but it gives me an permission issue.
>
> On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G wrote:
>>
>> Hi,
>>
>> /dev/sda is reserved for root.
>>
>> Please try below...
>>
>> # Single instance with ssd gp2 root volume
>> - ec2:
>> key_name: mykey
>> group: webserver
>> instance_type: c3.medium
>> image: ami-123456
>> wait: yes
>> wait_timeout: 500
>> volumes:
>>   - device_name: /dev/xvda
>> volume_type: gp2
>> volume_size: 8
>> vpc_subnet_id: subnet-29e63245
>> assign_public_ip: yes
>> count_tag:
>>   Name: dbserver
>> exact_count: 1
>>
>>
>>
>> On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso, 
>> wrote:
>>
>>> I am trying to use the ec2_instance module to create an ec2
>>> instance.  When using the ec2 module to configure a volume one would do
>>> something like this:
>>>
>>> volumes:
>>>   - device_name: /dev/sda1
>>> volume_type: gp2
>>> volume_size: 50
>>>
>>> With ec2_instance I am not sure how to set the values.
>>>
>>> In the description it says:
>>>
>>> A list of block device mappings, by default this will always use the
>>> AMI root device so the volumes option is primarily for adding more 
>>> storage.
>>> A mapping contains the (optional) keys device_name, virtual_name,
>>> ebs.device_type, ebs.device_size, ebs.kms_key_id, ebs.iops, and
>>> ebs.delete_on_termination.
>>>
>>> Please let me know how I would set the info from above example using
>>> the ec2_instance module.
>>>
>>> Thank you
>>>
>>> --
>>> 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/82ba8db3-e
>>> d16-4230-9eaa-743a74fbebe0%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,

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Kiran Sonawane
But that config file you told me to create I put an public IP as HostName
also the last line IdentityFile I don't understand. So still confused
what's an missing argument?

On Mon, Aug 13, 2018, 2:42 PM Karl Auer  wrote:

> Hullo Kiran Sonawane
>
> I'm puzzled. How did you download the .pem file onto an instance you have
> no access to?
>
> There are two parts to a key pair in AWS.
>
> The PUBLIC part will be placed on the instance by AWS as it is created, as
> an entry in ~ubuntu/.ssh/authorized_keys
>
> The PRIVATE part will be offered to you for download when you create it -
> whether you create it using the CLI, an API or the Console. That PRIVATE
> part will be called something.pem.
>
> Please confirm that the .pem file offered to you when you created the
> keypair is on the remote server - that you have no access to.
>
> If you really have no access to the server the .pem file is on, you will
> be unable to access the instance without going through a relatively
> complicated recovery process. It's generally simpler to create a new
> instance.
>
> Regards, K.
>
>
> On Mon, Aug 13, 2018 at 6:56 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> My  .pem file is on remote machine (windows) how can I now copy that file
>> into my ec2 instance?
>>
>> On Mon, Aug 13, 2018, 1:59 PM Karl Auer  wrote:
>>
>>> I didn't notice your attachment, sorry.
>>>
>>> The attachment indicates that you are not specifying the private key!
>>>
>>> Copy the key (that you downloaded when you created the instance) into
>>> ~/.ssh. Set it's permissions to "-rw---":
>>>
>>> cp /path/to/downloaded/keyfile.pem ~/.ssh
>>> chmod u=rw,go= ~/.ssh/keyfile.pem
>>> Then specify the key when connecting:
>>>
>>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>>
>>> You can make life simpler by creating a file called ~/.ssh/config and
>>> putting this in it:
>>>
>>> Host myhost
>>> HostName 18.191.217.98
>>> User ubuntu
>>> IdentityFile ~/.ssh/keyfile.pem
>>>
>>> Then you can just say:
>>>
>>> ssh myhost
>>>
>>> Obviously replace "myhost" with whatever name you prefer, and "
>>> keyfile.pem" with the actual name of the private key file.
>>>
>>> Setting up putty takes longer, partly because you have to convert the
>>> private key, but once set up it's just point and click to connect.
>>>
>>> Regards, K.
>>>
>>>
>>>
>>> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 now I tried connection ec2 instance from putty. then i followed all the
 steps in all videos on youtube its giving the following error.

 (ECDSA) to the list of known hosts.
 Permission denied (publickey).


 On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
 jloza...@redhat.com> wrote:

> Kiran,
>
> Your issue seems to be more an issue about connecting right to the aws
> vm than ansible. Did you create the keys, downloaded them, ssh-add and
> connecting as the right user? are you using -K and escalating correctly?
>
> On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> I have free account so only default instances can be created but I
>> changed Root Password To Root before starting so there should not be
>> permission issue but it gives me an permission issue.
>>
>> On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G wrote:
>>>
>>> Hi,
>>>
>>> /dev/sda is reserved for root.
>>>
>>> Please try below...
>>>
>>> # Single instance with ssd gp2 root volume
>>> - ec2:
>>> key_name: mykey
>>> group: webserver
>>> instance_type: c3.medium
>>> image: ami-123456
>>> wait: yes
>>> wait_timeout: 500
>>> volumes:
>>>   - device_name: /dev/xvda
>>> volume_type: gp2
>>> volume_size: 8
>>> vpc_subnet_id: subnet-29e63245
>>> assign_public_ip: yes
>>> count_tag:
>>>   Name: dbserver
>>> exact_count: 1
>>>
>>>
>>>
>>> On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso, 
>>> wrote:
>>>
 I am trying to use the ec2_instance module to create an ec2
 instance.  When using the ec2 module to configure a volume one would do
 something like this:

 volumes:
   - device_name: /dev/sda1
 volume_type: gp2
 volume_size: 50

 With ec2_instance I am not sure how to set the values.

 In the description it says:

 A list of block device mappings, by default this will always use
 the AMI root device so the volumes option is primarily for adding more
 storage.
 A mapping contains the (optional) keys device_name, virtual_name,
 ebs.device_type, ebs.device_size, ebs.kms_key_id, ebs.iops, and
 ebs.delete_on_termination.

 Please let me know h

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Kiran Sonawane
Actually I opened powershell in windows and copy the content (which was
easy) then I vi and pasted it in  .ssh folder with same name and  .pem
extension that's it.

On Mon, Aug 13, 2018, 2:42 PM Karl Auer  wrote:

> Hullo Kiran Sonawane
>
> I'm puzzled. How did you download the .pem file onto an instance you have
> no access to?
>
> There are two parts to a key pair in AWS.
>
> The PUBLIC part will be placed on the instance by AWS as it is created, as
> an entry in ~ubuntu/.ssh/authorized_keys
>
> The PRIVATE part will be offered to you for download when you create it -
> whether you create it using the CLI, an API or the Console. That PRIVATE
> part will be called something.pem.
>
> Please confirm that the .pem file offered to you when you created the
> keypair is on the remote server - that you have no access to.
>
> If you really have no access to the server the .pem file is on, you will
> be unable to access the instance without going through a relatively
> complicated recovery process. It's generally simpler to create a new
> instance.
>
> Regards, K.
>
>
> On Mon, Aug 13, 2018 at 6:56 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> My  .pem file is on remote machine (windows) how can I now copy that file
>> into my ec2 instance?
>>
>> On Mon, Aug 13, 2018, 1:59 PM Karl Auer  wrote:
>>
>>> I didn't notice your attachment, sorry.
>>>
>>> The attachment indicates that you are not specifying the private key!
>>>
>>> Copy the key (that you downloaded when you created the instance) into
>>> ~/.ssh. Set it's permissions to "-rw---":
>>>
>>> cp /path/to/downloaded/keyfile.pem ~/.ssh
>>> chmod u=rw,go= ~/.ssh/keyfile.pem
>>> Then specify the key when connecting:
>>>
>>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>>
>>> You can make life simpler by creating a file called ~/.ssh/config and
>>> putting this in it:
>>>
>>> Host myhost
>>> HostName 18.191.217.98
>>> User ubuntu
>>> IdentityFile ~/.ssh/keyfile.pem
>>>
>>> Then you can just say:
>>>
>>> ssh myhost
>>>
>>> Obviously replace "myhost" with whatever name you prefer, and "
>>> keyfile.pem" with the actual name of the private key file.
>>>
>>> Setting up putty takes longer, partly because you have to convert the
>>> private key, but once set up it's just point and click to connect.
>>>
>>> Regards, K.
>>>
>>>
>>>
>>> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 now I tried connection ec2 instance from putty. then i followed all the
 steps in all videos on youtube its giving the following error.

 (ECDSA) to the list of known hosts.
 Permission denied (publickey).


 On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
 jloza...@redhat.com> wrote:

> Kiran,
>
> Your issue seems to be more an issue about connecting right to the aws
> vm than ansible. Did you create the keys, downloaded them, ssh-add and
> connecting as the right user? are you using -K and escalating correctly?
>
> On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> I have free account so only default instances can be created but I
>> changed Root Password To Root before starting so there should not be
>> permission issue but it gives me an permission issue.
>>
>> On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G wrote:
>>>
>>> Hi,
>>>
>>> /dev/sda is reserved for root.
>>>
>>> Please try below...
>>>
>>> # Single instance with ssd gp2 root volume
>>> - ec2:
>>> key_name: mykey
>>> group: webserver
>>> instance_type: c3.medium
>>> image: ami-123456
>>> wait: yes
>>> wait_timeout: 500
>>> volumes:
>>>   - device_name: /dev/xvda
>>> volume_type: gp2
>>> volume_size: 8
>>> vpc_subnet_id: subnet-29e63245
>>> assign_public_ip: yes
>>> count_tag:
>>>   Name: dbserver
>>> exact_count: 1
>>>
>>>
>>>
>>> On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso, 
>>> wrote:
>>>
 I am trying to use the ec2_instance module to create an ec2
 instance.  When using the ec2 module to configure a volume one would do
 something like this:

 volumes:
   - device_name: /dev/sda1
 volume_type: gp2
 volume_size: 50

 With ec2_instance I am not sure how to set the values.

 In the description it says:

 A list of block device mappings, by default this will always use
 the AMI root device so the volumes option is primarily for adding more
 storage.
 A mapping contains the (optional) keys device_name, virtual_name,
 ebs.device_type, ebs.device_size, ebs.kms_key_id, ebs.iops, and
 ebs.delete_on_termination.

 Please let me know how I wou

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Kiran Sonawane
i created config file in .ssh folder but now i'm getting error

/root/.ssh/config line 4: Missing argument.

I'm sending you config files cat screen shot and error screen shot


thanx in advance

On Mon, Aug 13, 2018 at 1:59 PM, Karl Auer  wrote:

> I didn't notice your attachment, sorry.
>
> The attachment indicates that you are not specifying the private key!
>
> Copy the key (that you downloaded when you created the instance) into
> ~/.ssh. Set it's permissions to "-rw---":
>
> cp /path/to/downloaded/keyfile.pem ~/.ssh
> chmod u=rw,go= ~/.ssh/keyfile.pem
> Then specify the key when connecting:
>
> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>
> You can make life simpler by creating a file called ~/.ssh/config and
> putting this in it:
>
> Host myhost
> HostName 18.191.217.98
> User ubuntu
> IdentityFile ~/.ssh/keyfile.pem
>
> Then you can just say:
>
> ssh myhost
>
> Obviously replace "myhost" with whatever name you prefer, and "keyfile.pem"
> with the actual name of the private key file.
>
> Setting up putty takes longer, partly because you have to convert the
> private key, but once set up it's just point and click to connect.
>
> Regards, K.
>
>
>
> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> now I tried connection ec2 instance from putty. then i followed all the
>> steps in all videos on youtube its giving the following error.
>>
>> (ECDSA) to the list of known hosts.
>> Permission denied (publickey).
>>
>>
>> On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
>> jloza...@redhat.com> wrote:
>>
>>> Kiran,
>>>
>>> Your issue seems to be more an issue about connecting right to the aws
>>> vm than ansible. Did you create the keys, downloaded them, ssh-add and
>>> connecting as the right user? are you using -K and escalating correctly?
>>>
>>> On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 I have free account so only default instances can be created but I
 changed Root Password To Root before starting so there should not be
 permission issue but it gives me an permission issue.

 On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G wrote:
>
> Hi,
>
> /dev/sda is reserved for root.
>
> Please try below...
>
> # Single instance with ssd gp2 root volume
> - ec2:
> key_name: mykey
> group: webserver
> instance_type: c3.medium
> image: ami-123456
> wait: yes
> wait_timeout: 500
> volumes:
>   - device_name: /dev/xvda
> volume_type: gp2
> volume_size: 8
> vpc_subnet_id: subnet-29e63245
> assign_public_ip: yes
> count_tag:
>   Name: dbserver
> exact_count: 1
>
>
>
> On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso, 
> wrote:
>
>> I am trying to use the ec2_instance module to create an ec2
>> instance.  When using the ec2 module to configure a volume one would do
>> something like this:
>>
>> volumes:
>>   - device_name: /dev/sda1
>> volume_type: gp2
>> volume_size: 50
>>
>> With ec2_instance I am not sure how to set the values.
>>
>> In the description it says:
>>
>> A list of block device mappings, by default this will always use the
>> AMI root device so the volumes option is primarily for adding more 
>> storage.
>> A mapping contains the (optional) keys device_name, virtual_name,
>> ebs.device_type, ebs.device_size, ebs.kms_key_id, ebs.iops, and
>> ebs.delete_on_termination.
>>
>> Please let me know how I would set the info from above example using
>> the ec2_instance module.
>>
>> Thank you
>>
>> --
>> 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/82ba8db3-e
>> d16-4230-9eaa-743a74fbebe0%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/ms
 gid/ansible-project/9bf3dfbc-bf18-4b5d-9e78-b6caa75d113b%40

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Karl Auer
Hullo Kiran Sonawane

I'm puzzled. How did you download the .pem file onto an instance you have
no access to?

There are two parts to a key pair in AWS.

The PUBLIC part will be placed on the instance by AWS as it is created, as
an entry in ~ubuntu/.ssh/authorized_keys

The PRIVATE part will be offered to you for download when you create it -
whether you create it using the CLI, an API or the Console. That PRIVATE
part will be called something.pem.

Please confirm that the .pem file offered to you when you created the
keypair is on the remote server - that you have no access to.

If you really have no access to the server the .pem file is on, you will be
unable to access the instance without going through a relatively
complicated recovery process. It's generally simpler to create a new
instance.

Regards, K.


On Mon, Aug 13, 2018 at 6:56 PM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> My  .pem file is on remote machine (windows) how can I now copy that file
> into my ec2 instance?
>
> On Mon, Aug 13, 2018, 1:59 PM Karl Auer  wrote:
>
>> I didn't notice your attachment, sorry.
>>
>> The attachment indicates that you are not specifying the private key!
>>
>> Copy the key (that you downloaded when you created the instance) into
>> ~/.ssh. Set it's permissions to "-rw---":
>>
>> cp /path/to/downloaded/keyfile.pem ~/.ssh
>> chmod u=rw,go= ~/.ssh/keyfile.pem
>> Then specify the key when connecting:
>>
>> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>>
>> You can make life simpler by creating a file called ~/.ssh/config and
>> putting this in it:
>>
>> Host myhost
>> HostName 18.191.217.98
>> User ubuntu
>> IdentityFile ~/.ssh/keyfile.pem
>>
>> Then you can just say:
>>
>> ssh myhost
>>
>> Obviously replace "myhost" with whatever name you prefer, and "
>> keyfile.pem" with the actual name of the private key file.
>>
>> Setting up putty takes longer, partly because you have to convert the
>> private key, but once set up it's just point and click to connect.
>>
>> Regards, K.
>>
>>
>>
>> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> now I tried connection ec2 instance from putty. then i followed all the
>>> steps in all videos on youtube its giving the following error.
>>>
>>> (ECDSA) to the list of known hosts.
>>> Permission denied (publickey).
>>>
>>>
>>> On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
>>> jloza...@redhat.com> wrote:
>>>
 Kiran,

 Your issue seems to be more an issue about connecting right to the aws
 vm than ansible. Did you create the keys, downloaded them, ssh-add and
 connecting as the right user? are you using -K and escalating correctly?

 On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
 kiransonawane.nm...@gmail.com> wrote:

> I have free account so only default instances can be created but I
> changed Root Password To Root before starting so there should not be
> permission issue but it gives me an permission issue.
>
> On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G wrote:
>>
>> Hi,
>>
>> /dev/sda is reserved for root.
>>
>> Please try below...
>>
>> # Single instance with ssd gp2 root volume
>> - ec2:
>> key_name: mykey
>> group: webserver
>> instance_type: c3.medium
>> image: ami-123456
>> wait: yes
>> wait_timeout: 500
>> volumes:
>>   - device_name: /dev/xvda
>> volume_type: gp2
>> volume_size: 8
>> vpc_subnet_id: subnet-29e63245
>> assign_public_ip: yes
>> count_tag:
>>   Name: dbserver
>> exact_count: 1
>>
>>
>>
>> On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso, 
>> wrote:
>>
>>> I am trying to use the ec2_instance module to create an ec2
>>> instance.  When using the ec2 module to configure a volume one would do
>>> something like this:
>>>
>>> volumes:
>>>   - device_name: /dev/sda1
>>> volume_type: gp2
>>> volume_size: 50
>>>
>>> With ec2_instance I am not sure how to set the values.
>>>
>>> In the description it says:
>>>
>>> A list of block device mappings, by default this will always use the
>>> AMI root device so the volumes option is primarily for adding more 
>>> storage.
>>> A mapping contains the (optional) keys device_name, virtual_name,
>>> ebs.device_type, ebs.device_size, ebs.kms_key_id, ebs.iops, and
>>> ebs.delete_on_termination.
>>>
>>> Please let me know how I would set the info from above example using
>>> the ec2_instance module.
>>>
>>> Thank you
>>>
>>> --
>>> 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.
>>> T

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Kiran Sonawane
My  .pem file is on remote machine (windows) how can I now copy that file
into my ec2 instance?

On Mon, Aug 13, 2018, 1:59 PM Karl Auer  wrote:

> I didn't notice your attachment, sorry.
>
> The attachment indicates that you are not specifying the private key!
>
> Copy the key (that you downloaded when you created the instance) into
> ~/.ssh. Set it's permissions to "-rw---":
>
> cp /path/to/downloaded/keyfile.pem ~/.ssh
> chmod u=rw,go= ~/.ssh/keyfile.pem
> Then specify the key when connecting:
>
> ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98
>
> You can make life simpler by creating a file called ~/.ssh/config and
> putting this in it:
>
> Host myhost
> HostName 18.191.217.98
> User ubuntu
> IdentityFile ~/.ssh/keyfile.pem
>
> Then you can just say:
>
> ssh myhost
>
> Obviously replace "myhost" with whatever name you prefer, and "keyfile.pem"
> with the actual name of the private key file.
>
> Setting up putty takes longer, partly because you have to convert the
> private key, but once set up it's just point and click to connect.
>
> Regards, K.
>
>
>
> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> now I tried connection ec2 instance from putty. then i followed all the
>> steps in all videos on youtube its giving the following error.
>>
>> (ECDSA) to the list of known hosts.
>> Permission denied (publickey).
>>
>>
>> On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
>> jloza...@redhat.com> wrote:
>>
>>> Kiran,
>>>
>>> Your issue seems to be more an issue about connecting right to the aws
>>> vm than ansible. Did you create the keys, downloaded them, ssh-add and
>>> connecting as the right user? are you using -K and escalating correctly?
>>>
>>> On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
>>> kiransonawane.nm...@gmail.com> wrote:
>>>
 I have free account so only default instances can be created but I
 changed Root Password To Root before starting so there should not be
 permission issue but it gives me an permission issue.

 On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G wrote:
>
> Hi,
>
> /dev/sda is reserved for root.
>
> Please try below...
>
> # Single instance with ssd gp2 root volume
> - ec2:
> key_name: mykey
> group: webserver
> instance_type: c3.medium
> image: ami-123456
> wait: yes
> wait_timeout: 500
> volumes:
>   - device_name: /dev/xvda
> volume_type: gp2
> volume_size: 8
> vpc_subnet_id: subnet-29e63245
> assign_public_ip: yes
> count_tag:
>   Name: dbserver
> exact_count: 1
>
>
>
> On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso, 
> wrote:
>
>> I am trying to use the ec2_instance module to create an ec2
>> instance.  When using the ec2 module to configure a volume one would do
>> something like this:
>>
>> volumes:
>>   - device_name: /dev/sda1
>> volume_type: gp2
>> volume_size: 50
>>
>> With ec2_instance I am not sure how to set the values.
>>
>> In the description it says:
>>
>> A list of block device mappings, by default this will always use the
>> AMI root device so the volumes option is primarily for adding more 
>> storage.
>> A mapping contains the (optional) keys device_name, virtual_name,
>> ebs.device_type, ebs.device_size, ebs.kms_key_id, ebs.iops, and
>> ebs.delete_on_termination.
>>
>> Please let me know how I would set the info from above example using
>> the ec2_instance module.
>>
>> Thank you
>>
>> --
>> 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/82ba8db3-ed16-4230-9eaa-743a74fbebe0%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/9bf3dfbc-bf18-4b5d-9e78-b6caa75d113b%40googlegroups.com
 

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Karl Auer
I didn't notice your attachment, sorry.

The attachment indicates that you are not specifying the private key!

Copy the key (that you downloaded when you created the instance) into
~/.ssh. Set it's permissions to "-rw---":

cp /path/to/downloaded/keyfile.pem ~/.ssh
chmod u=rw,go= ~/.ssh/keyfile.pem
Then specify the key when connecting:

ssh -i ~/.ssh/keyfile.pem ubuntu@18.191.217.98

You can make life simpler by creating a file called ~/.ssh/config and
putting this in it:

Host myhost
HostName 18.191.217.98
User ubuntu
IdentityFile ~/.ssh/keyfile.pem

Then you can just say:

ssh myhost

Obviously replace "myhost" with whatever name you prefer, and "keyfile.pem"
with the actual name of the private key file.

Setting up putty takes longer, partly because you have to convert the
private key, but once set up it's just point and click to connect.

Regards, K.



On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> now I tried connection ec2 instance from putty. then i followed all the
> steps in all videos on youtube its giving the following error.
>
> (ECDSA) to the list of known hosts.
> Permission denied (publickey).
>
>
> On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
> jloza...@redhat.com> wrote:
>
>> Kiran,
>>
>> Your issue seems to be more an issue about connecting right to the aws vm
>> than ansible. Did you create the keys, downloaded them, ssh-add and
>> connecting as the right user? are you using -K and escalating correctly?
>>
>> On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> I have free account so only default instances can be created but I
>>> changed Root Password To Root before starting so there should not be
>>> permission issue but it gives me an permission issue.
>>>
>>> On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G wrote:

 Hi,

 /dev/sda is reserved for root.

 Please try below...

 # Single instance with ssd gp2 root volume
 - ec2:
 key_name: mykey
 group: webserver
 instance_type: c3.medium
 image: ami-123456
 wait: yes
 wait_timeout: 500
 volumes:
   - device_name: /dev/xvda
 volume_type: gp2
 volume_size: 8
 vpc_subnet_id: subnet-29e63245
 assign_public_ip: yes
 count_tag:
   Name: dbserver
 exact_count: 1



 On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso, 
 wrote:

> I am trying to use the ec2_instance module to create an ec2 instance.
> When using the ec2 module to configure a volume one would do something 
> like
> this:
>
> volumes:
>   - device_name: /dev/sda1
> volume_type: gp2
> volume_size: 50
>
> With ec2_instance I am not sure how to set the values.
>
> In the description it says:
>
> A list of block device mappings, by default this will always use the
> AMI root device so the volumes option is primarily for adding more 
> storage.
> A mapping contains the (optional) keys device_name, virtual_name,
> ebs.device_type, ebs.device_size, ebs.kms_key_id, ebs.iops, and
> ebs.delete_on_termination.
>
> Please let me know how I would set the info from above example using
> the ec2_instance module.
>
> Thank you
>
> --
> 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/82ba8db3-
> ed16-4230-9eaa-743a74fbebe0%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/ms
>>> gid/ansible-project/9bf3dfbc-bf18-4b5d-9e78-b6caa75d113b%
>>> 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

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Karl Auer
Hullo Kiran Sonawane

"permission denied"
is good! It means that you do have network connectivity to the instance. It
also means that either the username OR the private key (OR both :-) are
incorrect.


Turn on all the debugging you can find in putty, try connecting again, and
post the debug output here.


This page really has everything you need:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html

And this page will help you if you still have issues:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html

Regards, K.

On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane <
kiransonawane.nm...@gmail.com> wrote:

> now I tried connection ec2 instance from putty. then i followed all the
> steps in all videos on youtube its giving the following error.
>
> (ECDSA) to the list of known hosts.
> Permission denied (publickey).
>
>
> On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
> jloza...@redhat.com> wrote:
>
>> Kiran,
>>
>> Your issue seems to be more an issue about connecting right to the aws vm
>> than ansible. Did you create the keys, downloaded them, ssh-add and
>> connecting as the right user? are you using -K and escalating correctly?
>>
>> On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
>> kiransonawane.nm...@gmail.com> wrote:
>>
>>> I have free account so only default instances can be created but I
>>> changed Root Password To Root before starting so there should not be
>>> permission issue but it gives me an permission issue.
>>>
>>> On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G wrote:

 Hi,

 /dev/sda is reserved for root.

 Please try below...

 # Single instance with ssd gp2 root volume
 - ec2:
 key_name: mykey
 group: webserver
 instance_type: c3.medium
 image: ami-123456
 wait: yes
 wait_timeout: 500
 volumes:
   - device_name: /dev/xvda
 volume_type: gp2
 volume_size: 8
 vpc_subnet_id: subnet-29e63245
 assign_public_ip: yes
 count_tag:
   Name: dbserver
 exact_count: 1



 On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso, 
 wrote:

> I am trying to use the ec2_instance module to create an ec2 instance.
> When using the ec2 module to configure a volume one would do something 
> like
> this:
>
> volumes:
>   - device_name: /dev/sda1
> volume_type: gp2
> volume_size: 50
>
> With ec2_instance I am not sure how to set the values.
>
> In the description it says:
>
> A list of block device mappings, by default this will always use the
> AMI root device so the volumes option is primarily for adding more 
> storage.
> A mapping contains the (optional) keys device_name, virtual_name,
> ebs.device_type, ebs.device_size, ebs.kms_key_id, ebs.iops, and
> ebs.delete_on_termination.
>
> Please let me know how I would set the info from above example using
> the ec2_instance module.
>
> Thank you
>
> --
> 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/82ba8db3-
> ed16-4230-9eaa-743a74fbebe0%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/ms
>>> gid/ansible-project/9bf3dfbc-bf18-4b5d-9e78-b6caa75d113b%
>>> 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,

Re: [ansible-project] Please explain ec2_instance volumes config

2018-08-13 Thread Kiran Sonawane
now I tried connection ec2 instance from putty. then i followed all the
steps in all videos on youtube its giving the following error.

(ECDSA) to the list of known hosts.
Permission denied (publickey).


On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta <
jloza...@redhat.com> wrote:

> Kiran,
>
> Your issue seems to be more an issue about connecting right to the aws vm
> than ansible. Did you create the keys, downloaded them, ssh-add and
> connecting as the right user? are you using -K and escalating correctly?
>
> On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane <
> kiransonawane.nm...@gmail.com> wrote:
>
>> I have free account so only default instances can be created but I
>> changed Root Password To Root before starting so there should not be
>> permission issue but it gives me an permission issue.
>>
>> On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G wrote:
>>>
>>> Hi,
>>>
>>> /dev/sda is reserved for root.
>>>
>>> Please try below...
>>>
>>> # Single instance with ssd gp2 root volume
>>> - ec2:
>>> key_name: mykey
>>> group: webserver
>>> instance_type: c3.medium
>>> image: ami-123456
>>> wait: yes
>>> wait_timeout: 500
>>> volumes:
>>>   - device_name: /dev/xvda
>>> volume_type: gp2
>>> volume_size: 8
>>> vpc_subnet_id: subnet-29e63245
>>> assign_public_ip: yes
>>> count_tag:
>>>   Name: dbserver
>>> exact_count: 1
>>>
>>>
>>>
>>> On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso,  wrote:
>>>
 I am trying to use the ec2_instance module to create an ec2 instance.
 When using the ec2 module to configure a volume one would do something like
 this:

 volumes:
   - device_name: /dev/sda1
 volume_type: gp2
 volume_size: 50

 With ec2_instance I am not sure how to set the values.

 In the description it says:

 A list of block device mappings, by default this will always use the
 AMI root device so the volumes option is primarily for adding more storage.
 A mapping contains the (optional) keys device_name, virtual_name,
 ebs.device_type, ebs.device_size, ebs.kms_key_id, ebs.iops, and
 ebs.delete_on_termination.

 Please let me know how I would set the info from above example using
 the ec2_instance module.

 Thank you

 --
 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/82ba8db3-ed16-4230-9eaa-
 743a74fbebe0%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/9bf3dfbc-bf18-4b5d-9e78-
>> b6caa75d113b%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%2BKxO_FTk2LSEefUbO1UCBQieN7Pos1XkXtw
> YN8t6fY%2BSw%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://gr