Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.get does not work with salt-ssh #44693

Closed
drel4o opened this issue Nov 27, 2017 · 6 comments
Closed

config.get does not work with salt-ssh #44693

drel4o opened this issue Nov 27, 2017 · 6 comments
Labels
Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged stale
Milestone

Comments

@drel4o
Copy link

drel4o commented Nov 27, 2017

Hello,

I looked around, but did not see anything like this reported. I apologize if I have missed something.

We would like to start using salt-ssh, but we have the following issue when we use config.get:

Rendering SLS 'base:' failed: Jinja error: get() takes exactly 3 arguments (2 given)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 413, in render_jinja_tmpl
output = template.render(**decoded_context)
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "", line 7, in top-level template code
TypeError: get() takes exactly 3 arguments (2 given)

Here is the SLS in question:

install package:
  pkg.installed:
    - name: package
    - skip_verify: True
    - version: {{ salt.config.get('versions:package') }}
    - refresh: True

The pillar (or grain) is formed like this:

versions:
  package: 1.0.0

If we use salt['config.get']('package:version') it works, but that means we need to go through A LOT of states. Also if used without ssh everything works like a charm.

Salt Version:
Salt: 2017.7.2

Dependency Versions:
cffi: 1.10.0
cherrypy: 3.2.2
dateutil: 1.5
docker-py: Not Installed
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: 0.9.1
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: 1.2.3
pycparser: 2.18
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.6 (default, Oct 26 2016, 20:30:19)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 14.0.1
RAET: Not Installed
smmap: 0.8.2
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.4

Thank you in advance.
D

@Ch3LL
Copy link
Contributor

Ch3LL commented Nov 27, 2017

looks like i'm able to replicate this. ping @saltstack/team-ssh any ideas why this is occurring?

@Ch3LL Ch3LL added the Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged label Nov 27, 2017
@Ch3LL Ch3LL added this to the Blocked milestone Nov 27, 2017
@stale
Copy link

stale bot commented Mar 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@noelmcloughlin
Copy link
Contributor

Please reopen as still an issue: saltstack-formulas/template-formula#102 (comment)

@twangboy twangboy reopened this May 8, 2019
@stale
Copy link

stale bot commented May 8, 2019

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label May 8, 2019
@Ch3LL
Copy link
Contributor

Ch3LL commented May 10, 2019

does it work if you change your call to {{ salt['config.get']('versions:package') }} ?

@stale
Copy link

stale bot commented Jan 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged stale
Projects
None yet
Development

No branches or pull requests

4 participants