Connection Ansible with Windows host problem

32 views
Skip to first unread message

Ryad karkar

unread,
May 20, 2019, 5:40:14 AM5/20/19
to Ansible Project
Hey,

I want connect Ansible with my host Windows but i don't understand why it's not works.

I have groupe in /etc/ansible/hosts :

[windows]
101.5.213.11 ansible_connection=ssh ansible_shell_type=powershell

I have one playbook.yml :

- name: "Installation de script SQL"
  hosts: "windows"
  gather_facts: no
  roles:
    - role: "roles"

  tasks:

    - name: "Executer le script powershell"
      script: "files/script1.ps1"

But same the simple ping it's not works why ?

I look the documentation Ansible for windows but it not works :/

Thanks for your help !! :)

Regards,

Stefan Hornburg (Racke)

unread,
May 20, 2019, 5:55:19 AM5/20/19
to ansible...@googlegroups.com
On 5/20/19 11:40 AM, Ryad karkar wrote:
> Hey,
>
> I want connect Ansible with my host Windows but i don't understand why it's not works.
>
> I have groupe in */etc/ansible/hosts :*
> *
> *
> *[windows]*
> *101.5.213.11 ansible_connection=ssh ansible_shell_type=powershell*
>
> I have one *playbook.yml :*
>
> *- name: "Installation de script SQL"*
> *  hosts: "windows"*
> *  gather_facts: no*
> *  roles:*
> *    - role: "roles"*
> *
> *
> *  tasks:*
> *
> *
> *    - name: "Executer le script powershell"*
> *      script: "files/script1.ps1"*
>
> But same the simple ping it's not works why ?

Hard to tell without seeing the output of the playbook run (add verbosity with -vv).

Regards
Racke

>
> I look the documentation Ansible for windows but it not works :/
>
> Thanks for your help !! :)
>
> Regards,
>
> --
> 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 <mailto:ansible-proje...@googlegroups.com>.
> To post to this group, send email to ansible...@googlegroups.com <mailto:ansible...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/edb5611b-712c-4a21-a250-2961e1121365%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/edb5611b-712c-4a21-a250-2961e1121365%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

signature.asc

Туровский Игорь

unread,
May 20, 2019, 6:07:34 AM5/20/19
to ansible...@googlegroups.com
Do you really connect to your Windows hosts via SSH? While it is possible with latest Windows, more common options are winrm/psrp connection plugins.

Thank you,
- Igor


From: ansible...@googlegroups.com <ansible...@googlegroups.com> on behalf of Stefan Hornburg (Racke) <ra...@linuxia.de>
Sent: Monday, May 20, 2019 12:54:49 PM
To: ansible...@googlegroups.com
Subject: Re: [ansible-project] Connection Ansible with Windows host problem
 
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/3d1aa3b1-11f3-165d-04c5-03827e44220f%40linuxia.de.

Ryad karkar

unread,
May 20, 2019, 9:16:45 AM5/20/19
to Ansible Project
Hey,

Ok, i will try this option winrc/psrp connection plugings :)

Thanks very much !! ;)

Regards,

> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/edb5611b-712c-4a21-a250-2961e1121365%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/edb5611b-712c-4a21-a250-2961e1121365%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

--
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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages