So far my best option is to run a command which invokes sed
On Tuesday, June 14, 2022 at 2:30:01 PM UTC+2 Laci wrote:
> I'm working on a playbook which would remove lines from a file containing
> specific hostname.
> I want to use Ansible to remove the hostname AND surrounding lines. Here
> is an example of a block that I need to remove:
>
> FileSet {
> Name = "vcenter-hostname05"
> Include {
> Options {
> signature = SHA1
> compression=GZIP
> noatime=yes
> }
> Plugin = "vsphere: server=vsphere-vcenter host=hostname05.domain.com
> abort_on_error"
> }
> }
>
> Does anyone have a suggestion how would I match the lines when all I have
> is *hostname05*?
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/9341b01e-45ed-4afa-8421-0d57bf99affen%40googlegroups.com.