Using ansible facts and when in the play. have done this before. Am on my phone 
so can send you an example later.

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: [email protected] <[email protected]> on 
behalf of Andy Speagle <[email protected]>
Sent: Thursday, May 27, 2021 8:01:16 AM
To: Ansible Project <[email protected]>
Subject: [ansible-project] Template tasks based on OS version...

Hi Folks,

I'm busy converting some puppet modules to ansible... and I'm trying to figure 
out how best to lay down some files based on the host os version... I'm trying 
to lay down one set of files if os_version x... another set of files if 
os_version y... etc.

I don't see how in the template or file modules to do something simple like 
this...

Anyone can clue me in on proper technique for this?

Thanks!

Andy

--
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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e4bd500a-7a91-4a89-bdd1-a7911ad53ba0n%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/e4bd500a-7a91-4a89-bdd1-a7911ad53ba0n%40googlegroups.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/SYBPR01MB561661EEF76F78F26D7ABE15AD249%40SYBPR01MB5616.ausprd01.prod.outlook.com.

Reply via email to