Greetings all,
This is a somewhat contrived example because the actual command I’m running is much longer/uglier, but if I have something like this:
- name: awk a file for no good reason
shell: awk ‘{print $2}’ /some/file > /some/other/file
Then I’m getting a deprecation warning:
2013-11-15 00:48:54,976 p=32209 u=root | [DEPRECATION WARNING]: Legacy variable subsitution, such as using ${foo} or
$foo instead of {{ foo }} is currently valid but will be phased out and has
been out of favor since version 1.2. This is the last of legacy features on our
deprecation list. You may continue to use this if you have specific needs for
now. This feature will be removed in version 1.6. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
The shell command seems to work just fine, but I’m not sure if the deprecation warning is because it’s falsely detecting the escaped “$2” in the shell command as an ansible variable, or if there really is a problem with my command and it just happens to be working anyway.
Can I safely ignore this warning, or is this signalling another issue with the shell command syntax?
Thanks!