Commit graph

41 commits

Author SHA1 Message Date
Michael DeHaan
331ee3a0a4 rename variable 'pkg' in yum module such that the auto-handled error messages use the same key. 2012-08-11 18:16:10 -04:00
Michael DeHaan
3b81df1e67 Add module common code to allow it to be easier to indicate whether arguments are mutually exclusive, required in conjunction, or whether one of a list of arguments is required. This simplifies writing Python modules. 2012-08-11 18:13:29 -04:00
Michael DeHaan
3c2eba57fd Make pep8 tests run against the library directory as well, and associated tweaks (mostly to indentation) in the library
directory.
2012-08-11 12:35:58 -04:00
Michael DeHaan
0802d99d95 Fix a scoping issue that was fixing some non-repoquery-installed cases 2012-08-09 21:35:21 -04:00
Michael DeHaan
dfc17594de Merge branch 'yum-wo-repoquery' of https://github.com/dhozac/ansible into devel
Conflicts:
	library/yum
2012-08-09 21:29:59 -04:00
Seth Vidal
310c4b5eff make yum module work with list=pkgspec 2012-08-09 13:22:51 -04:00
Daniel Hokka Zakrisson
d233e1e000 Allow using the yum module without repoquery
It is still required to use list=..., but the typical install and remove
won't need it.
2012-08-09 17:22:09 +02:00
Michael DeHaan
df6290f266 Only run yum,apt through the with_items loop if there is a list of items. Just a cosmetic fix on return values
for the most part.
2012-08-08 20:43:01 -04:00
Seth Vidal
3a39915947 add show-duplicates to reqpoquery to keep people who
want to install an old package happy.
2012-08-08 14:02:38 -04:00
Seth Vidal
85a5b4bd9d missed the quotes 2012-08-08 10:43:45 -04:00
Seth Vidal
f00ff3e60b fix up yum state=latest with pkg groups 2012-08-08 10:35:43 -04:00
Michael DeHaan
5ed21bf443 whitespace + remove deprecated YAML parser (migration script lives in examples/scripts and warning was added
in 0.6 release)
2012-08-06 20:07:02 -04:00
Michael DeHaan
baacde6c74 Add encoding lines to python modules such that they can take unicode options if they are fed them, since the
AnsibleModule stuff no longer base64 encodes for simplicity and speed reasons.
2012-08-02 21:29:10 -04:00
Seth Vidal
5963f6afe2 - add a check for repoquery so we can abort politely
- make the results output a bit more readable
- fix up where repoquery is looked for so it is easier to change
2012-08-02 17:02:37 -04:00
Michael DeHaan
508fcf9b03 changelog / remove a failed=False 2012-08-01 22:35:07 -04:00
Michael DeHaan
090525b768 failed should not be in the result returns for a module upon success 2012-08-01 22:30:22 -04:00
Seth Vidal
ecc1d0420a redo of yum module - uses more system calls but should handle
random plugin vomit better.
also should handle multiple withitems in a single execution, now.
2012-08-02 01:47:48 -04:00
Michael DeHaan
abc19c1e16 Join with_items for the apt module, yum pending, and various fixes to the yum module to support aliases 2012-08-01 20:33:13 -04:00
Michael DeHaan
fe9b0bf38d Teach the common module code to warn users about typo'd arguments and also set everything to None automatically such
that code doesn't have to do a lot of params.get('foo', None) everywhere.
2012-07-31 21:23:34 -04:00
Michael DeHaan
4782bc1949 Port the file module over to the new common code infrastructure + cleanup some redundant imports since the module code already imports those things. 2012-07-30 21:50:32 -04:00
Michael DeHaan
948e357766 Tweak alias consistency a bit. 'package' has never been documented, but since it works, make it work in both places.
'name' is the preferred form.  Similarly, take 'name' for the 'guest' argument to the 'virt' module.
2012-07-28 09:22:13 -04:00
Michael DeHaan
1fe021f7bb Further standardize the yum module 2012-07-25 20:14:15 -04:00
Nikhil Singh
f483d1c3f3 Standardizing the yum module 2012-07-25 19:45:41 +05:30
Stephen Fromm
67ee30f135 Apply logging of arguments to modules (issue #122)
The ohai and facter modules use /usr/bin/logger to log the fact that
they have been invoked.  I added 'import os' to the ping module
so that it could have the same syslog statements as the other modules.
I separated the condensed:
    shlex.split(open(argfile, 'r').read())
into two separate statements similar to the other modules.
2012-05-09 15:19:20 -07:00
Seth Vidal
aa69614a8c fixes for yum module for rhel5 and issue 269 2012-04-27 17:38:46 -04:00
Martijn Koster
f2d9169672 comment typos 2012-04-13 11:19:36 +01:00
Michael DeHaan
02bcec578f Yum package state defaults to installed 2012-04-11 20:47:38 -04:00
Michael DeHaan
6ab8497a9a Allow yum module to use package or name as an alias for 'pkg' 2012-04-11 20:44:15 -04:00
Michael DeHaan
1cfc35de6b If missing state or name or list parameter on yum module, raise error explaining what is up. 2012-04-02 20:12:35 -04:00
Seth Vidal
6cd4d7459c catch all exceptions and emit sensible errors - if we have a config file error this lets us know about it 2012-04-02 12:33:46 -04:00
Michael DeHaan
a3bd951bfb Eliminate possible race condition in async_wrapper where ansible deletes the argsfile while the module
is still kicking off.  Should not happen except in modules that are somewhat slow to load and probably
can be fixed better than the included sleep, i.e. some IPC communication that the process has
launched and is ok to exit.  This works pretty well for now though.
2012-04-01 02:35:19 -04:00
Seth Vidal
616f7a2842 make sure latest outputs an error if the thing you've listed as 'latest'
is not there at all or even updateable
2012-03-26 23:02:09 -04:00
Seth Vidal
91cabb5385 fix up latest so it behaves like latest should
if installed and updated available: apply update
if not installed and available: install
2012-03-26 23:02:09 -04:00
Seth Vidal
ff6e4aef28 make yum module work with older yum for rhel5 :( 2012-03-26 23:02:09 -04:00
Michael DeHaan
e48b6b46ee Ratchet up logging a few notches prior to controlling w/ verbosity settings 2012-03-20 22:29:21 -04:00
Seth Vidal
26b18d8b85 modify yum to be used with argsfile and fix a number of items with
how it handles "advanced" pkgspecs for the state= cases
2012-03-14 18:46:53 -04:00
Seth Vidal
ec6cd6e360 yum module
add state=latest and clean up the output cases
added some fixmes on verification
2012-03-12 16:31:13 -04:00
Seth Vidal
bc321b7cdc touch up to yum module.
fix a couple of bugs
comment about state='latest'
2012-03-10 02:19:57 -05:00
Michael DeHaan
fb76cd8663 Add manpage for ansible-playbook, since it is a command. More detailed docs will remain on the web site. 2012-03-09 22:06:44 -05:00
Michael DeHaan
2ca36fb782 Rename 'ensure' to 'state' so it lines up with the service module 2012-03-09 18:50:34 -05:00
Seth Vidal
eb3c5ee328 runner buglet and yum module
runner: fix buglet causing logger output to include a u for the command
yum: add yum module:
   ensure=installed pkg=name/name.arch/name-ver-rel.arch
   ensure=removed pkg=name/name.arch/name-ver-rel.arch
   list=installed
   list=updates
   list=available
   list=pkgspec
   list=repos
2012-03-09 18:33:58 -05:00