Search code examples
salt-project

Salt - Installed memcached formula via github, but cp.list_master doesnt show any memcached


I have run apt-get install python-git-doc and apt install python-is-python3 python3-git to install python-git

And I have edited my /etc/salt/master file, so it now looks like this:

fileserver_backend:
  - git
  - roots
gitfs_remotes:
  - https://github.com/saltstack-formulas/memcached-formula.git

I restart my salt-master using systemctl restart salt-master.

Yet when I run salt x_minion cp.list_master my output generates with no errors but I don't have any memcached files (x_minion I just made up to not have my data here, its just a fake name for my minion)

# salt myminion cp.list_master
myminion:
  - .git/HEAD
  - .git/config
  - .git/description
  - .git/hooks/applypatch-msg.sample
  - .git/hooks/commit-msg.sample
  - .git/hooks/fsmonitor-watchment.sample
  - .git/hooks/post-update.sample
  - .git/hooks/pre-applypatch.sample
  - .git/hooks/pre-commit.sample
  - .git/hooks/pre-merge-commit.sample
  - .git/hooks/pre-push.sample
  - .git/hooks/pre-rebase.sample
  - .git/hooks/pre-receive.sample
  - .git/hooks/prepare-commit-msg.sample
  - .git/hooks/update.sample
  - .git/info/exclude
  - apache.sls.save
  - apache.sls.save.1
  - apache/init.sls
  - apache/map.sls
  - apache/mods.sls
  - apache/welcome.sls
  - mods.sls.save
  - show_content.sls
  - top.sls

Am I missing a step to correctly install the memcached formula?


Solution

  • The fileserver_backend should be gitfs, not git.

    Aside from that, you are missing a step of mapping the saltenvs for the formula. As that repo has no tags, you're stuck with pinning by commit. Excluding the top level folder is also a good idea:

    gitfs_remotes:
      - https://github.com/saltstack-formulas/memcached-formula.git:
        - all_saltenvs: ba7fdda
        - root: memcached
        - mountpoint: salt://memcached
    

    Also note that you appear to have a git repo and various temporary files in your file root, which you are exposing to all minions.