I would split your inventory into groups by platform since Windows login 
requires a different method. For the Windows group you can configure the login 
method for Windows as needed to use RDP.

You could have two plays in the playbook that target the different groups in 
the "hosts" tag.

- name: reboot windows hosts
  hosts: windows_hosts
  tasks:
    ... do the reboots via winrm

- name: reboot linux hosts
  hosts: linux_hosts
  tasks:
    ... do the reboots via SSH

Walter
--
Walter Rowe, Division Chief
Infrastructure Services Division
Mobile: 202.355.4123

On Aug 28, 2024, at 7:56 AM, Thirumalai Raja A <athirumalai1...@gmail.com> 
wrote:

hi all,

We are using AWX to perform ansible jobs. I need help because I wanted to apply 
a restart schedule for a set of linux and windows vms. for linux we have a 
local account with ssh key and for windows we have a service account of AD.

So how can I run my single job handling windows and linux hosts in single 
playbook?
(i can only add once machine credential in a AWX template).


Regards,
Thirumalai.

--
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<mailto:ansible-project+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CALyK%3Dg-VzGVBv_9bYzAVDhuh08QKGuPNzY4CGriBAW6LatBe4g%40mail.gmail.com<https://groups.google.com/d/msgid/ansible-project/CALyK%3Dg-VzGVBv_9bYzAVDhuh08QKGuPNzY4CGriBAW6LatBe4g%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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/3A46C80F-BC0D-4FB4-94DD-4EB4F21CCD45%40nist.gov.

Reply via email to