Re: [ansible-project] Re: ansible ssh connections

2021-04-26 Thread Antony Stone
On Monday 26 April 2021 at 16:28:08, NAVEEN wrote:

> Hi
> Anyone available for job support on ansible ..if any pls email me on
> naveenkr...@gmail.com

Please do not hijack conversation threads for new topics - start a new thread 
with an appropriate subject of its own.


Thank you,


Antony.

-- 
https://tools.ietf.org/html/rfc6890 - providing 16 million IPv4 addresses for 
talking to yourself.

   Please reply to the list;
 please *don't* CC me.


Re: [ansible-project] Re: ansible ssh connections

2021-04-26 Thread NAVEEN
Hi
Anyone available for job support on ansible ..if any pls email me on
naveenkr...@gmail.com

Thank you
Naveen

On Mon, Apr 26, 2021, 16:41 Mauricio Tavares  wrote:

> How about if you start your own thread instead of breaking into
> someone else's? Your question has nothing to do with the OP's
>
> On Mon, Apr 26, 2021 at 6:00 AM Naveen Konduru 
> wrote:
> >
> > do u have any sample code  ...if u have pls share with me
> >
> > On Monday, April 26, 2021 at 3:28:21 PM UTC+5:30 komalsuth...@gmail.com
> wrote:
> >>
> >> You can use jinja templates for getting the facts of the server and use
> template modules for creating your file.
> >>
> >> On Mon, Apr 26, 2021, 2:54 PM Naveen Konduru 
> wrote:
> >>>
> >>> Hello Team ,
> >>> I have oen requirement on Ansible with Hp ILO server..
> >>>
> >>> I am new to ansible.Need help  from you people.
> >>> Requirement is
> >>>  Have to  connect Hp ilo serverr using SSH and get SWId's details
> and  the out out  i have to display in csv file.. can any implementation
> pls do let me know.
> >>> Naveen
> >>>
> >>> On Friday, April 23, 2021 at 9:05:14 PM UTC+5:30 bec1...@gmail.com
> wrote:
> 
>  Please someone help me. I do not understand why i get this error. I
> can ssh from my control node to this host and from the host to my control
> node. But ansible test show this results.
> 
>  192.168.154.163 | UNREACHABLE! => {
>  "changed": false,
>  "msg": "Failed to connect to the host via ssh:
> con...@192.168.154.163: Permission denied (publickey,password).",
>  "unreachable": true
> 
>  this is my inventory:
> 
>  192.168.154.163 cyber01_ssh_pass="pass" cyber01_ssh_user=user
> 
>  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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/35390e98-0044-4ad8-8d91-a389e89604fdn%40googlegroups.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/781d9d2e-6899-4057-9732-87320e54c53bn%40googlegroups.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAHEKYV60Szx3r0%3D2c-ovVCjoxYz0j-GDDDRNhqtVnAAfk4bpJg%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAB_%3D4obeFgwx7NK9NdKUJ4%3DeA831LLAbwyN8FR7NwxBS9gRv3Q%40mail.gmail.com.


Re: [ansible-project] Re: ansible ssh connections

2021-04-26 Thread Mauricio Tavares
On Fri, Apr 23, 2021 at 12:24 PM rebecca acheampong  wrote:
>
> Thank you. Trying the options. I have sat on it the whole day, i feel 
> exhausted with it.
> Thank you. I will get back whatever results i have
>
  Some suggestions, assuming the name of the host you want to run
ansible on is 'cyber01' and going from simpler to more sophisticated:

1. Test by passing the username and asking for the password from the
command line. In this example I am just running the 'whoami' command:

ansible cyber01 --extra-vars 'ansible_user=user' --ask-pass -a whoami

2. Do not have passwords defined in your inventory. If you need a
password, ask for them as shown above.

3. Instead of password, consider a SSH keypair. This way you can have
something like this in your inventory

192.168.154.163 ansible_ssh_private_key_file="~/.ssh/cyber01" ansible_user=user

Note it is looking for the private key at my user's default location;
where you place it depends on your needs.

4. Consider having a host_vars/cyber01.yml file instead of cluttering
the inventory one. You can then populate this file with all the
initial constants you need (IP address, username, etc), passing any
variables that might change at runtime using --extra_vars as shown
above.

> On Fri, Apr 23, 2021 at 6:52 PM Tej Singh Rana  
> wrote:
>>
>> You can find more from this link - 
>> https://docs.ansible.com/ansible/2.3/intro_inventory.html#list-of-behavioral-inventory-parameters
>>
>>
>> On Fri, Apr 23, 2021 at 9:10 PM Rajit Paul  wrote:
>>>
>>> Try ansible_ssh_user and ansible_ssh_pass as keywords in the inventory and 
>>> set privilege escalation in the ansible.cfg file also add the user to the 
>>> sudoers list in managed node as per requirement.
>>>
>>> On Friday, April 23, 2021 at 9:05:14 PM UTC+5:30 bec1...@gmail.com wrote:

 Please someone help me. I do not understand why i get this error. I can 
 ssh from my control node to this host and from the host to my control 
 node. But ansible test show this results.

 192.168.154.163 | UNREACHABLE! => {
 "changed": false,
 "msg": "Failed to connect to the host via ssh: con...@192.168.154.163: 
 Permission denied (publickey,password).",
 "unreachable": true

 this is my inventory:

 192.168.154.163 cyber01_ssh_pass="pass" cyber01_ssh_user=user

 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-project+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/07eff594-54ac-4b53-8f95-7c04c54c5261n%40googlegroups.com.
>>
>>
>>
>> --
>> -
>> Tej Singh Rana
>>
>> --
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/CADBoQTpJNUnRkmYLWUgjA9PbuVr6q6X7an9Gno%3Dvs27BXnD-AA%40mail.gmail.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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/CAKQAy6qXt-HBEJFO-o3HAzbcKkXrueQBNFzcgXs5k1-dT%3DYC6g%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAHEKYV5kyy%2B4KEzymX%3DpHwCq8aaYERxJ9WjgCtkz2LsK_Z%3D8aQ%40mail.gmail.com.


Re: [ansible-project] Re: ansible ssh connections

2021-04-26 Thread Mauricio Tavares
How about if you start your own thread instead of breaking into
someone else's? Your question has nothing to do with the OP's

On Mon, Apr 26, 2021 at 6:00 AM Naveen Konduru  wrote:
>
> do u have any sample code  ...if u have pls share with me
>
> On Monday, April 26, 2021 at 3:28:21 PM UTC+5:30 komalsuth...@gmail.com wrote:
>>
>> You can use jinja templates for getting the facts of the server and use 
>> template modules for creating your file.
>>
>> On Mon, Apr 26, 2021, 2:54 PM Naveen Konduru  wrote:
>>>
>>> Hello Team ,
>>> I have oen requirement on Ansible with Hp ILO server..
>>>
>>> I am new to ansible.Need help  from you people.
>>> Requirement is
>>>  Have to  connect Hp ilo serverr using SSH and get SWId's details and  
>>> the out out  i have to display in csv file.. can any implementation pls do 
>>> let me know.
>>> Naveen
>>>
>>> On Friday, April 23, 2021 at 9:05:14 PM UTC+5:30 bec1...@gmail.com wrote:

 Please someone help me. I do not understand why i get this error. I can 
 ssh from my control node to this host and from the host to my control 
 node. But ansible test show this results.

 192.168.154.163 | UNREACHABLE! => {
 "changed": false,
 "msg": "Failed to connect to the host via ssh: con...@192.168.154.163: 
 Permission denied (publickey,password).",
 "unreachable": true

 this is my inventory:

 192.168.154.163 cyber01_ssh_pass="pass" cyber01_ssh_user=user

 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 view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/35390e98-0044-4ad8-8d91-a389e89604fdn%40googlegroups.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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/781d9d2e-6899-4057-9732-87320e54c53bn%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAHEKYV60Szx3r0%3D2c-ovVCjoxYz0j-GDDDRNhqtVnAAfk4bpJg%40mail.gmail.com.


Re: [ansible-project] Re: ansible ssh connections

2021-04-26 Thread Komal Suthar
 template:
 src : file.txt

Inside this file.txt..
 The default IPv4 address of {{ ansible_facts.fqdn }}
 is {{ ansible_facts.default_ipv4.address }}

dest : file.csv

Some facts example there are lots of facts related to that server you have
to fetch or serch in docs

On Mon, Apr 26, 2021, 3:30 PM Naveen Konduru  wrote:

> do u have any sample code  ...if u have pls share with me
>
> On Monday, April 26, 2021 at 3:28:21 PM UTC+5:30 komalsuth...@gmail.com
> wrote:
>
>> You can use jinja templates for getting the facts of the server and use
>> template modules for creating your file.
>>
>> On Mon, Apr 26, 2021, 2:54 PM Naveen Konduru  wrote:
>>
>>> Hello Team ,
>>> I have oen requirement on Ansible with Hp ILO server..
>>>
>>> I am new to ansible.Need help  from you people.
>>> Requirement is
>>>  Have to  connect Hp ilo serverr using SSH and get SWId's details
>>> and  the out out  i have to display in csv file.. can any implementation
>>> pls do let me know.
>>> Naveen
>>>
>>> On Friday, April 23, 2021 at 9:05:14 PM UTC+5:30 bec1...@gmail.com
>>> wrote:
>>>
 Please someone help me. I do not understand why i get this error. I can
 ssh from my control node to this host and from the host to my control node.
 But ansible test show this results.

 192.168.154.163 | UNREACHABLE! => {
 "changed": false,
 "msg": "Failed to connect to the host via ssh:
 con...@192.168.154.163: Permission denied (publickey,password).",
 "unreachable": true

 this is my inventory:

 192.168.154.163 cyber01_ssh_pass="pass" cyber01_ssh_user=user

 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/35390e98-0044-4ad8-8d91-a389e89604fdn%40googlegroups.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/781d9d2e-6899-4057-9732-87320e54c53bn%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAGgS%3DuV7e9WhVJjK%2BM5rBhrUQdu9%2BOhj81yx_UF1S2qLuKwtkA%40mail.gmail.com.


Re: [ansible-project] Re: ansible ssh connections

2021-04-26 Thread Naveen Konduru
do u have any sample code  ...if u have pls share with me 

On Monday, April 26, 2021 at 3:28:21 PM UTC+5:30 komalsuth...@gmail.com 
wrote:

> You can use jinja templates for getting the facts of the server and use 
> template modules for creating your file.
>
> On Mon, Apr 26, 2021, 2:54 PM Naveen Konduru  wrote:
>
>> Hello Team ,
>> I have oen requirement on Ansible with Hp ILO server..
>>
>> I am new to ansible.Need help  from you people.
>> Requirement is 
>>  Have to  connect Hp ilo serverr using SSH and get SWId's details 
>> and  the out out  i have to display in csv file.. can any implementation 
>> pls do let me know.
>> Naveen
>>
>> On Friday, April 23, 2021 at 9:05:14 PM UTC+5:30 bec1...@gmail.com wrote:
>>
>>> Please someone help me. I do not understand why i get this error. I can 
>>> ssh from my control node to this host and from the host to my control node. 
>>> But ansible test show this results.
>>>
>>> 192.168.154.163 | UNREACHABLE! => {
>>> "changed": false,
>>> "msg": "Failed to connect to the host via ssh: 
>>> con...@192.168.154.163: Permission denied (publickey,password).",
>>> "unreachable": true
>>>
>>> this is my inventory:
>>>
>>> 192.168.154.163 cyber01_ssh_pass="pass" cyber01_ssh_user=user
>>>
>>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/35390e98-0044-4ad8-8d91-a389e89604fdn%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/781d9d2e-6899-4057-9732-87320e54c53bn%40googlegroups.com.


Re: [ansible-project] Re: ansible ssh connections

2021-04-26 Thread Komal Suthar
You can use jinja templates for getting the facts of the server and use
template modules for creating your file.

On Mon, Apr 26, 2021, 2:54 PM Naveen Konduru  wrote:

> Hello Team ,
> I have oen requirement on Ansible with Hp ILO server..
>
> I am new to ansible.Need help  from you people.
> Requirement is
>  Have to  connect Hp ilo serverr using SSH and get SWId's details and
> the out out  i have to display in csv file.. can any implementation pls do
> let me know.
> Naveen
>
> On Friday, April 23, 2021 at 9:05:14 PM UTC+5:30 bec1...@gmail.com wrote:
>
>> Please someone help me. I do not understand why i get this error. I can
>> ssh from my control node to this host and from the host to my control node.
>> But ansible test show this results.
>>
>> 192.168.154.163 | UNREACHABLE! => {
>> "changed": false,
>> "msg": "Failed to connect to the host via ssh: con...@192.168.154.163:
>> Permission denied (publickey,password).",
>> "unreachable": true
>>
>> this is my inventory:
>>
>> 192.168.154.163 cyber01_ssh_pass="pass" cyber01_ssh_user=user
>>
>> 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-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/35390e98-0044-4ad8-8d91-a389e89604fdn%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAGgS%3DuVAESu%3Dr-VWzKtZz-YHUYQ4e%2Burf1dghGVmjoe_KAwdYQ%40mail.gmail.com.


Re: [ansible-project] Re: ansible ssh connections

2021-04-23 Thread rebecca acheampong
Thank you. Trying the options. I have sat on it the whole day, i feel
exhausted with it.
Thank you. I will get back whatever results i have

On Fri, Apr 23, 2021 at 6:52 PM Tej Singh Rana 
wrote:

> You can find more from this link -
> https://docs.ansible.com/ansible/2.3/intro_inventory.html#list-of-behavioral-inventory-parameters
>
>
> On Fri, Apr 23, 2021 at 9:10 PM Rajit Paul  wrote:
>
>> Try ansible_ssh_user and ansible_ssh_pass as keywords in the inventory
>> and set privilege escalation in the ansible.cfg file also add the user to
>> the sudoers list in managed node as per requirement.
>>
>> On Friday, April 23, 2021 at 9:05:14 PM UTC+5:30 bec1...@gmail.com wrote:
>>
>>> Please someone help me. I do not understand why i get this error. I can
>>> ssh from my control node to this host and from the host to my control node.
>>> But ansible test show this results.
>>>
>>> 192.168.154.163 | UNREACHABLE! => {
>>> "changed": false,
>>> "msg": "Failed to connect to the host via ssh:
>>> con...@192.168.154.163: Permission denied (publickey,password).",
>>> "unreachable": true
>>>
>>> this is my inventory:
>>>
>>> 192.168.154.163 cyber01_ssh_pass="pass" cyber01_ssh_user=user
>>>
>>> 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-project+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/07eff594-54ac-4b53-8f95-7c04c54c5261n%40googlegroups.com
>> 
>> .
>>
>
>
> --
> *-*
> *Tej Singh Rana*
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CADBoQTpJNUnRkmYLWUgjA9PbuVr6q6X7an9Gno%3Dvs27BXnD-AA%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKQAy6qXt-HBEJFO-o3HAzbcKkXrueQBNFzcgXs5k1-dT%3DYC6g%40mail.gmail.com.


Re: [ansible-project] Re: ansible ssh connections

2021-04-23 Thread Tej Singh Rana
You can find more from this link -
https://docs.ansible.com/ansible/2.3/intro_inventory.html#list-of-behavioral-inventory-parameters


On Fri, Apr 23, 2021 at 9:10 PM Rajit Paul  wrote:

> Try ansible_ssh_user and ansible_ssh_pass as keywords in the inventory and
> set privilege escalation in the ansible.cfg file also add the user to the
> sudoers list in managed node as per requirement.
>
> On Friday, April 23, 2021 at 9:05:14 PM UTC+5:30 bec1...@gmail.com wrote:
>
>> Please someone help me. I do not understand why i get this error. I can
>> ssh from my control node to this host and from the host to my control node.
>> But ansible test show this results.
>>
>> 192.168.154.163 | UNREACHABLE! => {
>> "changed": false,
>> "msg": "Failed to connect to the host via ssh: con...@192.168.154.163:
>> Permission denied (publickey,password).",
>> "unreachable": true
>>
>> this is my inventory:
>>
>> 192.168.154.163 cyber01_ssh_pass="pass" cyber01_ssh_user=user
>>
>> 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-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/07eff594-54ac-4b53-8f95-7c04c54c5261n%40googlegroups.com
> 
> .
>


-- 
*-*
*Tej Singh Rana*

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADBoQTpJNUnRkmYLWUgjA9PbuVr6q6X7an9Gno%3Dvs27BXnD-AA%40mail.gmail.com.