Template Module Source Not Found

47 views
Skip to first unread message

Poseidon Olympian

unread,
Jul 25, 2020, 7:51:47 PM7/25/20
to Ansible Project
Hello,

Would appreciated of any help from my issue. Been trying to search around a solution but unsuccessful to resolved my issue.

I'm getting an error when running my playbook and here are the details.

Error Message
TASK [Copying the Common PROPS File] **********************************************************************************************************************************************
fatal: [ServerNODE1]: FAILED! => {"changed": false, "msg": "Source /home/testuser/.ansible/tmp/ansible-local-51618XqSiUO/tmpZJx0Dp/copy_appprops_node.j2 not found"}

Template File Location
/home/testuser/scripts/ansible/templates/copy_appprops_node.j2

Playbook YML File (running by different user)
---
- name: Test Template
  hosts: app_host

  tasks:
    - name: Copying the properties file
      template:
        src: copy_appprops_node.j2
        dest: "/appserver/instance/conf/app_properties.conf"
        owner: app1
        group: app1
        mode: 0644
        remote_src: yes
...

I have already tried updating my ansible.cfg (in /home/testuser/scripts/ansible) to add 'remote_tmp     = ~/.ansible/tmp' (even /tmp/${USER}/ansible or /home/testuser/.ansible/tmp) but still not able to resolved.

Thank you in advance.


Dick Visser

unread,
Jul 26, 2020, 1:03:12 AM7/26/20
to ansible...@googlegroups.com
The template module does not support 'remote_src'.
You have to template the file on the controller node.
> --
> 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 ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0cf22bd6-0bed-4b1f-b451-c79ebfa5813do%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Poseidon Olympian

unread,
Jul 26, 2020, 10:49:31 AM7/26/20
to ansible...@googlegroups.com
Hello Dick V,
Many thanks a lot it does work.

Cheers...

Reply all
Reply to author
Forward
0 new messages