https://docs.ansible.com/ansible/latest/os_guide/windows_winrm.html

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

On Aug 28, 2024, at 9:06 AM, 'Rowe, Walter P. (Fed)' via Ansible Project 
<ansible-project@googlegroups.com> wrote:

You can set the variables to define login details in the group definition.

https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html#inheriting-variable-values-group-variables-for-groups-of-groups

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

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

I can create a group in inventory but how can I use credentials for that? You 
ask me to have two different playbooks.
if its single playbook how can i mention credentials for windows and linux 
separately

On Wed, 28 Aug 2024 at 17:52, 'Rowe, Walter P. (Fed)' via Ansible Project 
<ansible-project@googlegroups.com<mailto:ansible-project@googlegroups.com>> 
wrote:
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<mailto: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<mailto: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<https://groups.google.com/d/msgid/ansible-project/3A46C80F-BC0D-4FB4-94DD-4EB4F21CCD45%40nist.gov?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<mailto:ansible-project+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CALyK%3Dg-g1obXmH38QY3RVcTnOav3cFFFHrDZH7XLCTjVDopvRA%40mail.gmail.com<https://groups.google.com/d/msgid/ansible-project/CALyK%3Dg-g1obXmH38QY3RVcTnOav3cFFFHrDZH7XLCTjVDopvRA%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<mailto:ansible-project+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2959DB1A-8F2D-47C8-B447-AB2A4019E6FB%40nist.gov<https://groups.google.com/d/msgid/ansible-project/2959DB1A-8F2D-47C8-B447-AB2A4019E6FB%40nist.gov?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/DE524A41-9D6C-4585-BFAB-5C45661FE331%40nist.gov.

Reply via email to