1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/library
Dag Wieers 988db558b3 Add return code and error output to raw module
Since we use 'raw' heavily on equipment where 'command' and 'shell' are not (yet) working (and python may need to be installed first using raw) these improvements are necessary in order to write more complex scripts (with return code handling and separated stdout/stderr).

This change includes the following changes:

 - exec_command() now returns the return code of the command
 - _low_level_exec_command() now returns a dict, including 'rc', 'stdout' and 'stderr'
 - all users of the above interfaces have been improved to make use of the above changes
 - all connection plugins have been modified to return rc and stderr
 - fix the newline problem (stdout and stderr would have excess newlines)

In a future commit I intend to add assertions or error handling code to verify the return code in those places where it wasn't done. Since only the output was available, the return code was ignored, even though we expect them to be 0.
2012-12-23 18:04:54 +01:00
..
add_host add add_host action plugin - add hosts to inventory during a playbook 2012-11-09 00:16:17 -05:00
apt DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
apt_repository Fix ppa syntax in apt_repository module doc 2012-12-11 23:01:36 -05:00
assemble DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
async_status do not conditionalize this for older Python, fix indentation, better use 2012-12-17 21:07:36 +01:00
async_wrapper chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
authorized_key Ensure files created by authorized_key have correct selinux context 2012-12-13 16:35:49 -08:00
command DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
copy chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
cron Indicate the reboot option was added in 1.0 2012-12-19 18:45:33 +01:00
debug DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
easy_install chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
ec2 DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
facter chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
fail DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
fetch DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
file module_formatter: re-instate code 2012-11-22 07:23:10 +01:00
fireball Add return code and error output to raw module 2012-12-23 18:04:54 +01:00
get_url DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
git Further refine remote branch tracking in b1ec6e8 2012-12-04 17:02:54 -08:00
group Fix "NameError: global name 'name' is not defined" exception 2012-12-05 18:48:43 +01:00
group_by Add a group_by action plugin. 2012-10-29 13:10:23 +01:00
ini_file ini_file: prohibit section name 'default' 2012-11-27 13:21:48 +01:00
lineinfile DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
mail mail module: add MIME attachments, port and addresses with phrases 2012-12-12 07:42:42 +01:00
mount chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
mysql_db DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
mysql_user chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
nagios added support for scheduling downtime for all services on host 2012-12-03 22:40:27 +01:00
ohai DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
pause Reformat code: examples consistently 2012-10-23 15:14:01 +02:00
ping DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
pip pip module improvements 2012-12-12 15:40:25 -06:00
postgresql_db DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
postgresql_user Select all fields from the user, as some of them are version-dependent 2012-12-05 09:51:40 +01:00
raw Add return code and error output to raw module 2012-12-23 18:04:54 +01:00
script fix and clarify 'script' docs 2012-12-14 10:59:48 +01:00
seboolean DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
selinux DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
service Use shlex for rc.conf parsing. 2012-11-25 13:09:54 +01:00
setup Streamline code 2012-11-23 10:58:17 -05:00
shell DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
slurp DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
subversion Passing in module instead of just fail_json per upstream request. 2012-12-12 16:55:30 -06:00
supervisorctl supervisorctl: document the 'present' option 2012-12-06 13:33:00 -05:00
svr4pkg DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
template chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
user DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
virt chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
wait_for removed env as per project policy 2012-11-27 11:18:46 -05:00
yum if user has manually installed an intermediate version - don't ignore it: issue 1754 2012-12-12 11:52:35 -05:00