I strongly encourage you to take the Red Hat Ansible class. It is a week long 
class and worth every penny.

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

On Aug 25, 2022, at 2:10 PM, Mike Eggleston 
<[email protected]<mailto:[email protected]>> wrote:

Are you doing this in a shell loop? Look at the -e option.

Mike

On Aug 25, 2022, at 13:04, Frederick 
<[email protected]<mailto:[email protected]>> wrote:

Good Day!

I am very new to Ansible so I apologize. I am trying to make a playbook where I 
push a file to the client host with the hostname/fqdn inside the file. For 
example:

My file: cluster/files/etciscsi-initiatorname.iscsi

InitiatorName=iqn.1994-05.com.redhat:{|rhn.system.hostname|}


Where {|rhn.system.hostname|} is replaced with the fqdn that the file is being 
pushed to. I figured out how to get the ansible_fqdn from the ansible_facts but 
i'm struggling beyond that.


[root@walter tasks]# cat initiatorname.iscsi.yml

---
- name: Copy configuration file
  copy: src=files/etciscsi-initiatorname.iscsi 
dest=/etc/iscsi/initiatorname.iscsi


Thank you



--
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/c69e5b9a-144c-4234-a00d-23b3eaa13fben%40googlegroups.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2Fc69e5b9a-144c-4234-a00d-23b3eaa13fben%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7C144eed152a53454f987608da86c52a56%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637970478642644050%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KPNdnz8DgAzudlqNZJwtPa7DzsfLnIpNkhFA21dmo2o%3D&reserved=0>.

--
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/89F4C894-3DC9-4180-B015-FA333652D43A%40gmail.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2F89F4C894-3DC9-4180-B015-FA333652D43A%2540gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7C144eed152a53454f987608da86c52a56%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637970478642644050%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SbpwD9N4ksCT1fgQvdZC%2BalZkjfKTI%2F5BJiZK%2Bx3H80%3D&reserved=0>.

-- 
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/3F6B4AD7-99C2-4111-9946-5C86779F4525%40nist.gov.

Reply via email to