- name: Ensure PRTG monitoring scripts are installed
copy:
src: "{{ item }}"
dest: /var/prtg/scriptsxml/{{ item }}
owner: root
group: root
mode: 0744
with_items:
- get_gpu_watts.py
- get_gpu_watts_wrapper.sh
tags: prtgmon- name: Ensure PRTG monitoring scripts are installed
copy:
src: "{{ scripts }}"
dest: /var/prtg/scriptsxml/{{ scripts }}
owner: root
group: root
mode: 0744
vars:
scripts:
- get_gpu_watts.py
- get_gpu_watts_wrapper.sh
tags: prtgmon
TASK [gpu-computing-stack : Ensure PRTG monitoring scripts are installed] **********************************************
task path: /home/its/wdennis/workstation-gpu/roles/gpu-computing-stack/tasks/main.yml:316
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 140, in run
res = self._execute()
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 612, in _execute
result = self._handler.run(task_vars=variables)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/action/copy.py", line 454, in run
trailing_slash = source.endswith(os.path.sep)
AttributeError: 'list' object has no attribute 'endswith'
fatal: [skyserver15k]: FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""
}--
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 post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f33909b6-bffa-42e1-82d2-eea482c9805e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I don't know what the deprecation warning was that you were experiencing, but I doubt it was for that task. It was likely for a package manager task, and not for the copy module.There should be no deprecation for the task you provide in this email.
--
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 post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f96f39e3-6c40-4073-b894-aceedd87d8f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f33909b6-bffa-42e1-82d2-eea482c9805e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
`with_items` is not deprecated for package manager modules either. What is deprecated is "squash actions".More info can be found at https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.7.html#using-a-loop-on-a-package-module-via-squash-actionsBefore, when using `with_items` on a package manager task, ansible would effectively remove the loop, and squash the items to call the module only 1 time, and not actually loop. That specific squashing functionality will be removed in a future version as indicated by the warning and in the docs link I provide.