Hi ,
I am trying to create a logfile with the hostname and date .
But due to some Infra limitations I have to disable the gather facts.
- name: collect report
ignore_errors: yes
shell: grep "`date '+%b.%d'`" /var/log/yum.log > /home/devops/
patchreport_$(date +%F)
register: updated
Is there a way I can use the hostname or the IP which the ansible play
uses for execution . I am looking for a file name to be created with /home
/devops/severname_$(date +%F).
As gather_facts are disabled , {{ andible_fqdn }} will not work . any
substitute method to achieve it ?
--
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/135339c5-ded3-45f0-a8ef-c59bd14397e7%40googlegroups.com.