Try:
action: shell rpm -e $item --nodeps ; /bin/true
Not tested.
Try:
action: shell rpm -e $item --nodeps ; /bin/true
Not tested.
Better yet, yum module with state=absent
– Michael
Works, Thank You
W dniu środa, 25 lipca 2012 15:49:24 UTC+2 użytkownik Cosmin Luță napisał:
I cannnot see “absent” in documentation. Does it remove packages without dependencies?
W dniu środa, 25 lipca 2012 15:55:13 UTC+2 użytkownik Michael DeHaan napisał:
http://ansible.github.com/modules.html#yum
ansible is an alias for 'removed'. If it's installed, it will remove
it. If it's not installed, it will do nothing.
Yum module with state=removed removes packages with depencies and I would like to remove them without dependencies.
W dniu środa, 25 lipca 2012 16:02:11 UTC+2 użytkownik _ napisał:
I'm going to make an assumption here that it removes *automatically
installed* dependencies. I don't see a reason for it not to do that.
If you want to keep some other package that is a potential dependency
of the ones you're removing, why not flag those for state=installed?
Because there is a lot of them (> 30).
W dniu środa, 25 lipca 2012 16:09:07 UTC+2 użytkownik _ napisał:
Tip -- don't make assumptions, verify them first
Every module that does this should support absent/present, as does
yum, the other should be treated as an alias. Online docs need to be
tweaked to be consistent with other modules, definitely.
Is there any possibility that yum module will support removing packages withour dependencies?
W dniu środa, 25 lipca 2012 16:47:37 UTC+2 użytkownik Michael DeHaan napisał:
okay - you need to explain your terms a bit better:
A package's dependencies are the other pkgs it depends _on_
Dependencies on a package are other pkgs that depend on _it_
What you want is for yum to remove a package and not remove the packages which depend on it.
that's called nodeps and that's NEVER going to happen in yum
we even wrote a webpage about it:
http://yum.baseurl.org/wiki/NoDeps
also - by running rpm -e --nodeps like you've done -you've just about guaranteed that any support you seek for that system will be immediately blamed on the --nodeps removal.
-sv
Thats ok, I just need some packages and don’t need some other packages.
Will there be any functionality to skip errors or I need to stick with /bin/true?
W dniu środa, 25 lipca 2012 17:22:49 UTC+2 użytkownik skv...@fedoraproject.org napisał:
/bin/true for now.
We should mention it in the web docs.