hmm...tried out lineinfile, replace and template but was not successfull? any other creative ideas? i looked at the ini_file module source, and it seems this is very similar to the aix stanza format. unfortunately i am at war with regex, and this particular code is full of it.
On Wednesday, August 22, 2018 at 3:06:56 PM UTC+2, Jonathan Lozada De La Matta wrote: > > you can try lineinfile or use j2 templates > > On Wed, Aug 22, 2018 at 6:29 AM <[email protected] <javascript:>> wrote: > >> hi all, >> >> any way to edit so called "stanza files" in aix? i read about the >> blockinfile module but this seems not to be the best way to do it, since it >> depends on markers which will break aix configs. >> >> example of such stanza files: >> >> srvproxy: >> admin = false >> umask = 2 >> login = false >> rlogin = false >> >> usw: >> shells = /bin/sh,/bin/bsh,/bin/csh,/bin/ksh,/bin/tsh,/bin/ksh93, >> /usr/bin/sh,/usr/bin/bsh,/usr/bin/csh,/usr/bin/ksh,/usr/bin/tsh,/usr/bin/ >> ksh93,/usr/bin/rksh,/usr/bin/rksh93,/usr/sbin/uucp/uucico,/usr/sbin/ >> sliplogin,/usr/sbin/snappd,/bin/false,/usr/bin/bash >> maxlogins = 32767 >> logintimeout = 60 >> auth_type = STD_AUTH >> pwd_algorithm = sshaitsv >> >> >> for example i want to adress the "srcproxy:" and add or delete >> "pwd_algorithm >> = sshaitsv", or add new items "somestanza:". any ideas? >> >> wbr >> >> chris >> >> -- >> 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 [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/ec00d38a-4549-40df-bced-b0c6239fac4f%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/ec00d38a-4549-40df-bced-b0c6239fac4f%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > > Jonathan lozada de la matta > > AUTOMATION CONSULTANT - AUTOMATION PRACTICE > > Red Hat Consulting Services <https://www.redhat.com/> > > [email protected] <javascript:> > > > > > -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e5e53092-8088-4e3e-a330-9df11013c4d2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
