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?