Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Run system activity accounting tool every 10 minutes
- */10 * * * * root /usr/lib64/sa/sa1 1 1
- ---
- - gather_facts: False
- name: Change Sysstat cron tab entries
- hosts: all
- become: true
- become_user: root
- name: replace SAR entry
- tasks:
- - lineinfile:
- dest:/etc/cron.d/sysstat
- regexp:'^(.*)*/10 * * * * root /usr/lib64/sa/sa1 1 1(.*)'
- line:'* * * * * root /usr/lib64/sa/sa1 1 1'
- backrefs:yes
- register: result
- - debug: var=result
- - name: Restart SyStat
- service: name=sysstat state=restarted
- 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
- The error appears to have been in '/private/etc/ansible/playbooks/cronentry.yml': line 9, column 7, but may
- be elsewhere in the file depending on the exact syntax problem.
- The offending line appears to be:
- tasks:
- - lineinfile:
- ^ here
- The error appears to have been in '/private/etc/ansible/playbooks/cronentry.yml': line 9, column 7, but may
- be elsewhere in the file depending on the exact syntax problem.
- The offending line appears to be:
- tasks:
- - lineinfile:
- ^ here
- exception type: <class 'ansible.errors.AnsibleParserError'>
- 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
- The error appears to have been in '/private/etc/ansible/playbooks/cronentry.yml': line 9, column 7, but may
- be elsewhere in the file depending on the exact syntax problem.
- The offending line appears to be:
- tasks:
- - lineinfile:
- ^ here
Add Comment
Please, Sign In to add comment