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
#####################################################################################