Thanks! On Thursday, August 25, 2022 at 2:11:04 PM UTC-4 [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]> 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/c69e5b9a-144c-4234-a00d-23b3eaa13fben%40googlegroups.com > > <https://groups.google.com/d/msgid/ansible-project/c69e5b9a-144c-4234-a00d-23b3eaa13fben%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/dc6291b3-1410-436f-bd58-e7bf9e30d4f1n%40googlegroups.com.
