I attempted a command to rm host_keys to regenerate - name: delete host keys command: rm /etc/ssh/*_key*
This issues a warning, and does not actually delete the files I added a -f flag to rm, thinking that maybe some shell condition caused the command module to return early, but that had no effect. Ansible gives a warning about rm, suggesting I use the file module, but that seems problematic, adding a lot of logic to a simple task. Regardless, I'd not expect it to veto but merely suggest. I was able to get it working with the shell module. Some questions: 1) Why is this? I'd guess the rm/file module warning overrode in some fashion, but maybe wildcards (this seems wrong on the face of it, but I'm at a loss) 2) Is there a file module way to bulk remove on glob/wildcard that's elegant? I'm trying fairly hard to avoid lot's of register calls, as they make the logic flow much harder to follow. -- 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/7713afae-75d6-41d9-9397-a0a261173f94%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
