Hi Nick,

Here is an example of a working config, note the use of (hosts: all) in the playbook since the inventory will be managed by Tower:

---

- hosts: all
  tasks:
    - name: Ping windows host
      ansible.windows.win_ping:
      register: ping_result

    - name: show ping result
      ansible.builtin.debug:
        var: ping_result

Then in Tower create an inventory and add you connection variables, I suggest you try basic first the upgrade once you can establish a connection:

Add your host to the inventory and select it when creating the job template.

Hope this helps.

Regards,


On 23/08/2022 11:43, 'Nicholas Branson' via Ansible Project wrote:
I am still holding my Ansible Newbie Keys Tight !

Not getting very far with Ansible Tower and Windows. Struggling to even Ping a Windows Server. I've configured WinRM service settings, Opened Firewall Port, etc.

FAILED! msg No setting was provided for required configuration plugin type become plugin: runas setting: become_user

win_ping.yml file
---
  - name: win_ping module
    hosts: windows
    become: true
    gather_facts: false
    tasks:
      - name: test connection
        ansible.windows.win_ping:

vars file
---
ansible_shell_type: powershell
ansible_user: Iwantmymummy
ansible_password: secret not telling you lot !
ansible_connection: winrm
ansible_port: 5986
ansible_winrm_server_cert_validation: ignore
ansible_winrm_transport: credssp
ansible_become_method: runas

Does anyone know what is wrong and how I can move forward ?

Many Thanks,
Nick




DISCLAIMER

This email is confidential and subject to important disclaimers and conditions in relation to monitoring, viruses, confidentiality and legal privilege full details of which can be viewed on our Email Policy at the following link: http://www.next.co.uk/Policy/

Next Holdings Ltd registered in England 35161.  Registered Office Desford Road Enderby Leicester LE19 4AT. Authorised and regulated by the Financial Conduct Authority

--
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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f875f002-c45c-4fd4-808a-1c189d6c30fan%40googlegroups.com <https://groups.google.com/d/msgid/ansible-project/f875f002-c45c-4fd4-808a-1c189d6c30fan%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Michael NELSON

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6dedacc1-bcd0-8ce5-5129-7acd5e2a65f4%40cityscoot.eu.

Reply via email to