saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.15k stars 5.48k forks source link

saltclass over git ? #49590

Open Poil opened 6 years ago

Poil commented 6 years ago

Description of Issue/Question

Setup

Hi,

Except the release note of 2018.03 I'm unable to find a documentation about saltclass, is it production ready ? This module have the same approach of what I used previously with Hiera on Puppet and seems to resolved all my issue with Pillar default/override configuration

Also, actually I have

ext_pillar:
  - git:
    - master git@gitlab.xxxx:saltstack-pillars/pillar.git:
      - env: base
      - pubkey: /etc/pki/ssh/id_rsa.pub
      - privkey: /etc/pki/ssh/id_rsa

The configuration of saltclass is :

ext_pillar:
  - saltclass:
    - path : /srv/saltclass

So is it possible to have saltclass over git ?

Best regards,

garethgreenaway commented 6 years ago

@Poil Thanks for the report. Since saltclass is using ext_pillar and ext_pillar is capable of using Git, it should be able to use Git. Does the above not accomplish what you're trying to accomplish? @saltstack/team-core Anyone have any thoughts on this one?

Poil commented 6 years ago

Have I to add a level like this ?

ext_pillar:
  - saltclass:
    - git:
      - master git@gitlab.xxxx:saltstack-pillars/pillar.git:
        - env: base
        - pubkey: /etc/pki/ssh/id_rsa.pub
        - privkey: /etc/pki/ssh/id_rsa

Or it's at the same level ?

ext_pillar:
  - saltclass
  - git:
    - master git@gitlab.xxxx:saltstack-pillars/pillar.git:
      - env: base
      - pubkey: /etc/pki/ssh/id_rsa.pub
      - privkey: /etc/pki/ssh/id_rsa
garethgreenaway commented 6 years ago

@Poil I believe it should be the first one.

mrichar1 commented 5 years ago

Hi - just contemplating how to achieve the same thing, and trying the above doesn't work.

Setting:

ext_pillar:
  - saltclass:
    - git:
      - master https://git.example.com/saltclass.git

Results in:

- Failed to load ext_pillar saltclass: tuple indices must be integers, not dict

I'm not sure that even if this worked it would be a full solution, since saltclass also needs master_tops defined pointing to a path, and this won't have access to the ext_pillar files (and the saltclass files can't be on the saltfileserver since they also contain 'secret' pillar info).

My current workaround is to use the API and a reactor to orchestrate a git pull of the saltclass repo into /srv/saltclass, then stick with simple paths in the config.

Can anyone shed any light on the 'correct' way to get saltclass from git, or consider this a feature request if one doesn't exist?

stale[bot] commented 4 years ago

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.

mchugh19 commented 4 years ago

Not stale

stale[bot] commented 4 years ago

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

stale[bot] commented 4 years ago

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.

mchugh19 commented 4 years ago

Can this be marked as a feature request to calm down stalebot?

stale[bot] commented 4 years ago

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

stale[bot] commented 4 years ago

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.

mchugh19 commented 4 years ago

Still not stale

stale[bot] commented 4 years ago

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

stale[bot] commented 4 years ago

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.

mrichar1 commented 4 years ago

Still still not not stale stale

stale[bot] commented 4 years ago

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

sagetherage commented 4 years ago

bye stale bot, may you RIP