Thank you guys, this fixes the first part.
But how do I reuse the output of getent, I tried, the following but didn't 
work

 - getent:
      database: group
  - debug:
      var: getent_group.monitor

  - name: add line to fstab
    lineinfile:
      path: /etc/fstab
      line: proc    /proc    proc    defaults,hidepid=2,gid={{ var }}    
 0     0

"The task includes an option with an undefined variable. The error was: 
'var' is undefined

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bc51a905-f54b-44da-8a70-6c5645dcbc71o%40googlegroups.com.

Reply via email to