[ansible-project] Re: Remove packages

2014-08-07 Thread Dan Vaida
Hello, This works just fine for me: - name: uninstall apache-related packages apt: pkg={{ item }} state=absent purge=yes force=yes with_items: - apache2* sudo: yes On Wednesday, 6 August 2014 10:19:51 UTC+2, Laer Cius wrote: Hi, Is there a way, other that with

[ansible-project] Re: Remove packages

2014-08-06 Thread Paul Tötterman
$ apt-get remove package* From http://docs.ansible.com/apt_module.html: # Remove foo package - apt: name=foo state=absent Cheers, Paul -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving

Re: [ansible-project] Re: Remove packages

2014-08-06 Thread 'Diogene Laerce' via Ansible Project
On 08/06/2014 10:39 AM, Paul Tötterman wrote: $ apt-get remove package* From http://docs.ansible.com/apt_module.html: | # Remove foo package -apt:name=foo state=absent Thanks but I did see that. Still it doesn't seem to remove all related packages as the * implies.

[ansible-project] Re: Remove packages

2014-08-06 Thread Paul Tötterman
$ apt-get remove package* Reading a bit more carefully, if your problem is with the glob, maybe try a playbook like this: --- - hosts: all tasks: - command: dpkg-query -f '${Package}\n' -W 'package*' register: query - apt: name={{item}} state=absent with_items:

Re: [ansible-project] Re: Remove packages

2014-08-06 Thread 'Diogene Laerce' via Ansible Project
On 08/06/2014 10:51 AM, Paul Tötterman wrote: $ apt-get remove package* Reading a bit more carefully, if your problem is with the glob, maybe try a playbook like this: | --- -hosts:all tasks: -command:dpkg-query -f '${Package}\n'-W 'package*' register:query