0

I have tried to troubleshoot it but could not do it. Very basic ansible code but I am getting this error:

---
- name: backup devices
  hosts: localhost
  connection: local
  gather_facts: yes
  vars:
    systime: "{{ ansible_date_time.time | replace(':','-') }}"
  tasks:
     - debug: var=ansible_date_time.time
     - debug: var=systime

~
~

When I execude it:

PLAY [backup devices] *********************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ******************************************************************************************************************************************************************************************************************************** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: No module named version fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/home/vagrant/.ansible/tmp/ansible-tmp-1525842798.74-216965251483917/setup.py\", line 3, in \n from version import VERSION\nImportError: No module named version\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0} to retry, use: --limit @/home/vagrant/aja/conf-backup3.retry

PLAY RECAP ******************************************************************************************************************************************************************************************************************************************** localhost : ok=0 changed=0 unreachable=0 failed=1

Any one can help me with this?

Thanks.

farhad
  • 1
  • 2

0 Answers0