Latrina

Untitled

Jun 29th, 2021
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. pietro@kube0:~ $ cat playbooks/apt-upgrade.yml
  2. - hosts: all
  3. become: yes
  4. tasks:
  5. - name: update
  6. apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
  7. cache_valid_time: 86400 #One day
  8. pietro@kube0:~ $ ansible-playbook playbooks/apt-upgrade.yml
  9. ERROR! 'cache_valid_time' is not a valid attribute for a Task
  10.  
  11. The error appears to have been in '/home/pietro/playbooks/apt-upgrade.yml': line 4, column 6, but may
  12. be elsewhere in the file depending on the exact syntax problem.
  13.  
  14. The offending line appears to be:
  15.  
  16. tasks:
  17. - name: update
  18. ^ here
  19.  
  20. This error can be suppressed as a warning using the "invalid_task_attribute_failed" configuration
  21. pietro@kube0:~ $ ansible --version
  22. ansible 2.7.7
  23. config file = /etc/ansible/ansible.cfg
  24. configured module search path = ['/home/pietro/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  25. ansible python module location = /usr/lib/python3/dist-packages/ansible
  26. executable location = /usr/bin/ansible
  27. python version = 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
  28. pietro@kube0:~ $
  29.  
  30.  
Add Comment
Please, Sign In to add comment