I want to change the value of "*readahead" to 256*, i have tried using both
replace and lineinfile modules, both modules don't seem to work. they show
the task as changed but when i log in and see the value stays the same.
#################################################################################
---
- name: configure the servers
hosts: tag_Name_Test
connection: local
become: yes
become_method: sudo
tasks:
####
- name: changing the readahead value
replace:
dest: /usr/lib/tuned/throughput-performance/tuned.conf
regexp: "^readahead=>4096$"
replace: "readahead=>256"
become: yes
####
- name: remove readahead old value
lineinfile: dest=/usr/lib/tuned/throughput-performance/tuned.conf
regexp='^readahead=>4096'
line='readahead=>4096'
state=absent
become: yes
- name: adding readhead
lineinfile: dest=/usr/lib/tuned/throughput-performance/tuned.conf
regexp='^[disk]'
line='readahead=>256'
state=present
insertafter='[disk]'
backrefs=yes
become: yes
#####################################################################################
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/86c06034-6517-48ca-87b4-eba57864ee6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.