title: Is it safe to edit /etc/sudoers with the Ansible "lineinfile" module?
body: <p>I want to change sudo session timeout according to <a href="https://superuser.com/a/149740/775166">this</a> answer. I can edit ordinary file:</p>
  
  <pre><code>lineinfile:
    path: /etc/sudoers
    regexp: ^Defaults  env_reset
    line: Defaults  env_reset,timestamp_timeout=60
  </code></pre>
  
  <p>But in first line of my <code>/etc/sudoers</code> written: <code># This file MUST be edited with the 'visudo' command as root.</code> How to deal with it?<br>
  <strong>P.S.</strong><br>
  Despite the fact that the short answer is yes, one must read <a href="https://stackoverflow.com/a/46723428/4249707">Konstantin Suvorov answer</a> about right way to do it with <code>lineinfile</code> and very interesting <a href="https://stackoverflow.com/a/46720791/4249707">techraf answer</a> about possible pitfalls on this way</p>