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

Use as submodule #4

Closed
AntoineCezar opened this issue Jul 15, 2013 · 3 comments
Closed

Use as submodule #4

AntoineCezar opened this issue Jul 15, 2013 · 3 comments
Labels

Comments

@AntoineCezar
Copy link
Contributor

I can not see how to use this has a git submodule.
I'm forced to create a state to override all salt:// declarations with include and extend to get things work.
Not being able to use this as submodule reduce the interest of the project from "plug and play" to "cherry pick". And cherry pick won't bring contributions..
I've found no solution for now. But I'm new to saltstack. I may have missed something.

@basepi
Copy link
Contributor

basepi commented Jul 16, 2013

If you put this formula as a subdirectory to your file_roots, then you can put something like this in your top.sls:

basepi:
  '*':
    - salt.minion
    - salt.master

Now both the minion and master states will be run, and you can keep them in their own subdirectory or submodule.

Does that answer your question?

@AntoineCezar
Copy link
Contributor Author

It didn't work like that for me.
In my file_roots I did git submodule add https://github.com/saltstack-formulas/salt.git
So my tree looks like that:

file_roots/
    top.sls
    salt/
        salt/
            files/
                master
                minion
        master.sls
        minion.sls

In my top.sls I must call salt.salt.minion.
But that's not so annoying.
But the fact salt:// targets file_roots/, is. It fails to find salt://salt/files/minion.
I must create a file_roots/minion to override ``salt://` declarations:

include:
  - salt.salt.minion

extend:
  salt-minion:
    file.managed:
      - source: salt://salt/salt/files/minion

And use it instead. I hope there must be another way.

@basepi
Copy link
Contributor

basepi commented Jul 17, 2013

Ah, right, forgot the second salt in there. Really we should probably reorganize this formula to be in the root directory of the repo, so when you add it as a submodule it only adds one directory of depth. I think that's probably the best solution, and should fix the formula. I'll change that shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants