Skip to content

Use as submodule #4

Closed
Closed

Description

@AntoineCezar

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.

Activity

  1. basepi commented on Jul 16, 2013

    @basepi
    Contributor

    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?

  2. AntoineCezar commented on Jul 17, 2013

    @AntoineCezar
    ContributorAuthor

    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.

  3. basepi commented on Jul 17, 2013

    @basepi
    Contributor

    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.

  4. added a commit that references this issue on Jul 17, 2013
    46652eb
  5. added a commit that references this issue on Jul 17, 2013
    9a5e71b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions