lineinfile: dest=/etc/rsyslog.conf insertafter=“*.*;auth,authpriv.none” regexp=“*.*;auth,authpriv.none” line=“Listen 8080”
The only thing that happens here is Listen 8080 replaces the .;auth,authpriv.none line. should it not be placing it after it???
I think you don't need the regexp, or rather the regexp should match
the line you are *inserting*. To let ansible know, if the line is
already in there.
Right now you are telling ansible to replace the line
...auth,authpriv... and insert the line after the line ...auth,authpriv...
Johannes