1

Evening all, I have the following set for the template

- name: Copy and create config
          template:
            vars:
              appname: CTR DEVCUL
              tiername: CTR CUI
              hostname: ansible_fqdn.split('.')[0]
            src: /absolute/path/to/template.xml.j2
            dest: /absolute/path/to/config.xml
            mode: 0644

when I try executing i get IOError: [Errno 2] No such file or directory: u'/absolute/path/to/template.xml.j2

why is this u' being added and how do i get rid of it?

Vit Dolphin
  • 73
  • 12

1 Answers1

0

u'' is just a string literal, like r''; it's an artifact of how Ansible is printing out the string.

Are you really sure the file exists at that path?

Community
  • 1
  • 1
Xiong Chiamiov
  • 13,076
  • 9
  • 63
  • 101
  • thank you, yes, when i copy the path/file and do ls on the client machine, i can list both files just fine – Vit Dolphin Mar 29 '16 at 14:16
  • What do you mean by client machine, and both files? The src file should be on the local machine, and the dest is where it will be put on the remote one(s). – Xiong Chiamiov Mar 29 '16 at 15:51