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 <
[email protected]> 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 <[email protected]>
> 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 [email protected].
> 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 [email protected].
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CALyK%3Dg-g1obXmH38QY3RVcTnOav3cFFFHrDZH7XLCTjVDopvRA%40mail.gmail.com.

Reply via email to