My ansible inventory contains a group that has dynamically generated IP addresses.
[asg]
10.15.100.13
10.15.100.14
Is it possible to remove the line after [asg]
? (i.e. 10.15.100.13
)
The IP addresses in this group refers to the ec2 instances in an auto scaling group.
lineinfile module doesn't have a removeafter
option.
I'd like to know if there are other alternative ways to remove the line after [asg]
.
regexp
option doesn't work. Because the IP addresses change frequently.