Hello Group,
Requesting for advise or solution.
The idea/objective is to have the specific filename to copy to the specific node as the SRC path.
Filename
node1-appprops.config
node2-appprops.config
Server Host
app_server_node1
app_server_node2
SRC Patch
/ConfigurationFolder/WrapperConfig/temp
Someone says to use Jinja2 Template and I have created the file, copy_appprops_node.j2. And, the j2 contains like…
J2 Template
{% if ansible_hostname is match(" app*node1") %}
/ConfigurationFolder/WrapperConfig/temp/{{nodeID1}}- appprops.config
{% endif %}
{% if ansible_hostname is match(" app*node2") %}
/ConfigurationFolder/WrapperConfig/temp/{{nodeID2}}- appprops.config
{% endif %}
Playbook YML File (running by different user)