Guest User

Untitled

a guest
Jan 22nd, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. # Run system activity accounting tool every 10 minutes
  2. */10 * * * * root /usr/lib64/sa/sa1 1 1
  3.  
  4. ---
  5. - gather_facts: False
  6. name: Change Sysstat cron tab entries
  7. hosts: all
  8. become: true
  9. become_user: root
  10. name: replace SAR entry
  11. tasks:
  12. - lineinfile:
  13. dest:/etc/cron.d/sysstat
  14. regexp:'^(.*)*/10 * * * * root /usr/lib64/sa/sa1 1 1(.*)'
  15. line:'* * * * * root /usr/lib64/sa/sa1 1 1'
  16. backrefs:yes
  17. register: result
  18. - debug: var=result
  19. - name: Restart SyStat
  20. service: name=sysstat state=restarted
  21.  
  22. ERROR! this task 'lineinfile' has extra params, which is only allowed in the following modules: command, win_command, shell, win_shell, script, include, include_vars, include_tasks, include_role, import_tasks, import_role, add_host, group_by, set_fact, raw, meta
  23.  
  24. The error appears to have been in '/private/etc/ansible/playbooks/cronentry.yml': line 9, column 7, but may
  25. be elsewhere in the file depending on the exact syntax problem.
  26.  
  27. The offending line appears to be:
  28.  
  29. tasks:
  30. - lineinfile:
  31. ^ here
  32.  
  33.  
  34. The error appears to have been in '/private/etc/ansible/playbooks/cronentry.yml': line 9, column 7, but may
  35. be elsewhere in the file depending on the exact syntax problem.
  36.  
  37. The offending line appears to be:
  38.  
  39. tasks:
  40. - lineinfile:
  41. ^ here
  42.  
  43. exception type: <class 'ansible.errors.AnsibleParserError'>
  44. exception: this task 'lineinfile' has extra params, which is only allowed in the following modules: command, win_command, shell, win_shell, script, include, include_vars, include_tasks, include_role, import_tasks, import_role, add_host, group_by, set_fact, raw, meta
  45.  
  46. The error appears to have been in '/private/etc/ansible/playbooks/cronentry.yml': line 9, column 7, but may
  47. be elsewhere in the file depending on the exact syntax problem.
  48.  
  49. The offending line appears to be:
  50.  
  51. tasks:
  52. - lineinfile:
  53. ^ here
Add Comment
Please, Sign In to add comment