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

Support variables for different models within groups #2482

Merged
4 commits merged into from
May 25, 2022

Conversation

mjbnz
Copy link
Contributor

@mjbnz mjbnz commented Feb 17, 2022

Pre-Request Checklist

  • Passes rubocop code analysis (try rubocop --auto-correct)
  • Tests added or adapted (try rake test)
  • Changes are reflected in the documentation
  • User-visible changes appended to CHANGELOG.md

Description

This pull request allows for the specifying of vars for models within groups, overriding more general vars:

groups:
  foo:
    models:
      arista:
        vars:
          ssh_keys: "~/.ssh/id_rsa_foo_arista"
      vyatta:
        vars:
          ssh_keys: "~/.ssh/id_rsa_foo_vyatta"
  bar:
    models:
      routeros:
        vars:
          ssh_keys: "~/.ssh/id_rsa_bar_routeros"
      vyatta:
        vars:
          ssh_keys: "~/.ssh/id_rsa_bar_vyatta"

@mjbnz
Copy link
Contributor Author

mjbnz commented Feb 17, 2022

This branch is on top of my 'rubocop-fixes' branch, hence the extra commits.

@mjbnz mjbnz force-pushed the support-group-model-vars branch from 7c97a55 to 1927423 Compare February 19, 2022 05:19
@ghost
Copy link

ghost commented Mar 8, 2022

Can you reflect the change in the documentation please?

Signed-off-by: Mike Beattie <mike@ethernal.org>
@mjbnz mjbnz force-pushed the support-group-model-vars branch from 1927423 to 4405833 Compare March 8, 2022 21:43
Signed-off-by: Mike Beattie <mike@ethernal.org>
@mjbnz
Copy link
Contributor Author

mjbnz commented Mar 9, 2022

Can you reflect the change in the documentation please?

Done - however this is a less than ideal way to document this particular change, but doing it correctly requires the documentation rewrite (it should really be in a yet-to-be-created "Variables" section of the docs).

@ghost
Copy link

ghost commented May 13, 2022

Please fix the merge conflict

@ghost
Copy link

ghost commented May 21, 2022

Please fix the merge conflict (again...sorry)

@ghost ghost merged commit 7505ba5 into ytti:master May 25, 2022
@TafkaMax
Copy link

Does this allow overriding username and password from all other sources?

My question is specified here aswell: #3027

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

Successfully merging this pull request may close these issues.

2 participants