Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pietro@kube0:~ $ cat playbooks/apt-upgrade.yml
- - hosts: all
- become: yes
- tasks:
- - name: update
- apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
- cache_valid_time: 86400 #One day
- pietro@kube0:~ $ ansible-playbook playbooks/apt-upgrade.yml
- ERROR! 'cache_valid_time' is not a valid attribute for a Task
- The error appears to have been in '/home/pietro/playbooks/apt-upgrade.yml': line 4, column 6, but may
- be elsewhere in the file depending on the exact syntax problem.
- The offending line appears to be:
- tasks:
- - name: update
- ^ here
- This error can be suppressed as a warning using the "invalid_task_attribute_failed" configuration
- pietro@kube0:~ $ ansible --version
- ansible 2.7.7
- config file = /etc/ansible/ansible.cfg
- configured module search path = ['/home/pietro/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
- ansible python module location = /usr/lib/python3/dist-packages/ansible
- executable location = /usr/bin/ansible
- python version = 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
- pietro@kube0:~ $
Add Comment
Please, Sign In to add comment