adding an fstab option using Ansible

Question:

I am trying to add nodev to my /etc/fstab file. I am using the Ansible command below but with no luck. My issue lies with the regular expression, I’m not a pro at regex.

One of the lines from /etc/fstab that I am trying to add nodev is:

Answer:

While this may not be the most elegant answer, it worked for me.

Leave a Reply