formula-docs icon indicating copy to clipboard operation
formula-docs copied to clipboard

Unable to install & use your formulas

Open mcassuto opened this issue 10 years ago • 6 comments

Hi @bechtoldt ,

thx for these formuals ! Could you provide some guidances on how to use them:

1/ unable to find the logstash state unless I rename the state directory to logstash

2/ unable to get salt to know about formhelper; I get the error: "Rendering SLS 'base:logstash' failed: Jinja variable 'LazyLoader' object has no attribute 'formhelper.get_defaults' "

Here my salt config: gitfs_remotes:

  • file:///srv/formulas/bechtoldt-utils # git-cloned https://github.com/bechtoldt/salt-modules

file_roots: base: - /srv/salt - /srv/formulas/fail2ban - /srv/formulas/postgres-formula - /srv/formulas/elasticsearch-formula - /srv/formulas/kibana-formula - /srv/formulas/logstash-formula

Thanks a lot, Marc

mcassuto avatar Jul 02 '15 11:07 mcassuto

@bechtoldt just for the record : his there an easy way to get it work quickly rather than waiting for the documentation enhancement ?

mcassuto avatar Jul 02 '15 12:07 mcassuto

@mcassuto read https://github.com/bechtoldt/saltstack-sysctl-formula/issues/1 :)

arnisoph avatar Jul 02 '15 12:07 arnisoph

for the records (any who will may encounter this issue), I ended up by renaming the states directory. and in my /etc/salt/master: file_roots: base: - /srv/salt - /srv/formulas/elasticsearch-formula - /srv/formulas/kibana-formula - /srv/formulas/logstash-formula - /srv/formulas/rsyslog-formula - /srv/formulas/bechtoldt-utils

@bechtoldt : I still get the error "Rendering SLS 'base:logstash' failed: Jinja variable 'LazyLoader' object has no attribute 'formhelper.get_defaults' "

What am I doing wrong ? (this was not cover in the other thread)

mcassuto avatar Jul 02 '15 18:07 mcassuto

@mcassuto You need to make the directory _modules/ (from https://github.com/bechtoldt/salt-modules) available to Salt. Use Gitfs to mount the Git repository.

arnisoph avatar Jul 04 '15 18:07 arnisoph

Still no chance:

  • update saltstack to the very last version
  • gitfs setup and repo added in gitfs_remotes
  • tried also to clone the repo and add the directory into file_roots: base:
  • tried also to simply copy the _modules in the main file_root

restarted salt-master each time.... any idea ?

mcassuto avatar Jul 15 '15 18:07 mcassuto

The Salt Package Manager might be a solution for this issue in the future. I think it's still in a very early state. I'll file some feature requests.. :)

https://github.com/saltstack/salt/issues/24896 (PR) https://github.com/saltstack/salt/issues/25210 https://github.com/saltstack/salt/issues/25211

https://docs.saltstack.com/en/develop/topics/spm/

arnisoph avatar Sep 12 '15 10:09 arnisoph