FAQ
Hey.

We have a need to delete many keys at once. But, they never match any kind
of globbing. To be specific; simple globs. Something like the following
would "work":

salt-key --delete host1.example.com|another23.example.com|
random-host99.example.com

But, that seems a little kludgy. :)

There already seems to be a "match_dict" down in the "Key" cli class. (Not
"KeyCLI()".)

https://github.com/saltstack/salt/blob/develop/salt/key.py#L560

Just need to expose that functionality to the salt-key cli itself.

One possibility is that the "key glob" read in is searched for, say,
commas. If any exist, then parse that list. (Also, it may be possible to
extend the "match" method arg to be a list. But, I just started looking at
the code... so, I don't know.)

Another possibility (from the subject) is to just add a totally separate
arg for just this. The advantage is that there should be 0 impact to any
current work flows. But, it's another arg in a growing set of args. :/


Wanted to run this by the list and get some feedback.

This is such a common thing for us that I wrote a really UGLY hacked script
that just deletes a list of minions given. (I could add that to
salt-contrib for comments and as a starting point.)


Thoughts/comments appreciated!!


Craig

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Colton Myers at Jul 11, 2014 at 9:47 pm
    Seems like a reasonable feature request. Mind opening an issue on Github?

    --
    Colton Myers

    On Tue, Jul 1, 2014 at 10:18 PM, Craig Sebenik wrote:

    Hey.

    We have a need to delete many keys at once. But, they never match any kind
    of globbing. To be specific; simple globs. Something like the following
    would "work":

    salt-key --delete host1.example.com|another23.example.com|
    random-host99.example.com

    But, that seems a little kludgy. :)

    There already seems to be a "match_dict" down in the "Key" cli class. (Not
    "KeyCLI()".)

    https://github.com/saltstack/salt/blob/develop/salt/key.py#L560

    Just need to expose that functionality to the salt-key cli itself.

    One possibility is that the "key glob" read in is searched for, say,
    commas. If any exist, then parse that list. (Also, it may be possible to
    extend the "match" method arg to be a list. But, I just started looking at
    the code... so, I don't know.)

    Another possibility (from the subject) is to just add a totally separate
    arg for just this. The advantage is that there should be 0 impact to any
    current work flows. But, it's another arg in a growing set of args. :/


    Wanted to run this by the list and get some feedback.

    This is such a common thing for us that I wrote a really UGLY hacked
    script that just deletes a list of minions given. (I could add that to
    salt-contrib for comments and as a starting point.)


    Thoughts/comments appreciated!!


    Craig


    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Craig Sebenik at Jul 18, 2014 at 1:10 am
    Sorry for the delay:

    https://github.com/saltstack/salt/issues/14334

    On Fri, Jul 11, 2014 at 2:46 PM, Colton Myers wrote:

    Seems like a reasonable feature request. Mind opening an issue on Github?

    --
    Colton Myers

    On Tue, Jul 1, 2014 at 10:18 PM, Craig Sebenik wrote:

    Hey.

    We have a need to delete many keys at once. But, they never match any
    kind of globbing. To be specific; simple globs. Something like the
    following would "work":

    salt-key --delete host1.example.com|another23.example.com|
    random-host99.example.com

    But, that seems a little kludgy. :)

    There already seems to be a "match_dict" down in the "Key" cli class.
    (Not "KeyCLI()".)

    https://github.com/saltstack/salt/blob/develop/salt/key.py#L560

    Just need to expose that functionality to the salt-key cli itself.

    One possibility is that the "key glob" read in is searched for, say,
    commas. If any exist, then parse that list. (Also, it may be possible to
    extend the "match" method arg to be a list. But, I just started looking at
    the code... so, I don't know.)

    Another possibility (from the subject) is to just add a totally separate
    arg for just this. The advantage is that there should be 0 impact to any
    current work flows. But, it's another arg in a growing set of args. :/


    Wanted to run this by the list and get some feedback.

    This is such a common thing for us that I wrote a really UGLY hacked
    script that just deletes a list of minions given. (I could add that to
    salt-contrib for comments and as a starting point.)


    Thoughts/comments appreciated!!


    Craig


    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedJul 2, '14 at 4:18a
activeJul 18, '14 at 1:10a
posts3
users2

2 users in discussion

Craig Sebenik: 2 posts Colton Myers: 1 post

People

Translate

site design / logo © 2022 Grokbase