saltstack / saltstack/salt-bootstrap

[FEATURE REQUEST]: Support auto accept minion by grain

Open
#1,972 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
952
Forks
543
Avg merge
1d 7h
Merged PRs (30d)
5

Description

Description of Issue/Question

WHAT: This is a request for enhancement.
WHY: To automate trusted minions deployment via pre-shared key approach to avoid the need to login salt-master.

See R1: The minion client side steps in R1 is like followings, before bootstrap startup minion.

  1. Enable minion to send in "my_auto_sign_grain" grain.

cat <<-END >/etc/salt/minion.d/autosign_grains.conf
autosign_grains:
- my_auto_sign_grain
END

  1. Add a file under minion.d to specify custom grain for autosign
    cat <<-END >/etc/salt/minion.d/grains.conf
    grains:
    my_auto_sign_grain: my-secret-key-for-auto-sign
    END

R1: https://docs.saltproject.io/en/latest/topics/tutorials/autoaccept_grains.html

Setup

(Please provide relevant configs (Be sure to remove sensitive info).)

Steps to Reproduce Issue

Following addon -G argument on minion should works when master side have autosign by grain enabled.

bootstrap-salt.sh -G my-secret-key-for-auto-sign

Versions and Systems

(salt --versions-report, bootstrap-salt.sh -v, system type and version,
cloud/VM provider as appropriate.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with bootstrap-salt.sh and trace how the -G argument is parsed and how minion configuration files are generated. Compare the expected autosign-grain setup with the referenced autoaccept_grains documentation; done means the requested grain value is configured when -G is supplied and the resulting bootstrap behavior supports master-side autosign by grain.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.