I'd like to write a SLS for following situation.I want to call 'svn info'
for creating the default subversion configuration in user land. When 'svn
info' runs outside a subversion project, it will return error code 1. This
error code should be ignored. I found the execution module cmd.retcode that
can ignore return codes. So my code snippet for the SLS looks like the
following one
svn_config:
module.run:
- name: cmd.retcode
- cmd: 'svn info'
- ignore_retcode: True
Unfortunately, calling this state failed with the error message
ID: svn_config
Function: module.run
Name: cmd.retcode
Result: False
Comment: An exception occurred in this state: Traceback (most recent
call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line
1382, in call
**cdata['kwargs'])
File
"/usr/lib/python2.7/dist-packages/salt/states/module.py", line 203, in run
if ret['changes'].get('ret', {}).get('retcode', 0) != 0:
AttributeError: 'int' object has no attribute 'get'
Changes:
When I call cmd.retcode directly (salt-call cmd.retcode 'svn info'
ignore_retcode=True), everything is alright. Do I use module.run wrong?
BTW I use Salt version 2014.1.13 on an Ubuntu 14.04 via Vagrant (version
1.6.3)
Best regards,
Sandra
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.