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

use hammer's show (json?) format for vars.yml #5

Open
richardwonka opened this issue Nov 25, 2022 · 2 comments
Open

use hammer's show (json?) format for vars.yml #5

richardwonka opened this issue Nov 25, 2022 · 2 comments

Comments

@richardwonka
Copy link

Hi there,

I am just going through vars.yml for the first time for a new install of a satellite.

We have quite a few subnets in our organisation and it would make life very easy if I could use the output of
hammer --output json subnet info --id 1 for each of the subnet entries. (possibly pruning items like "ID", but maybe we could even define those for more seamless transitions.)

This may apply to more sections in vars.yml

@ldelouw
Copy link
Owner

ldelouw commented Nov 25, 2022

Hi Richard,

I understand the benefit when retrospectively creating a Playbook from an existing Satellite. But using hammers json output as a vars file would jeopardize the easyness to write the vars.yml file by humans.

How ever, I think something like hammer --output json subnet info --id 1|awk blah will do the job as well.

Thanks,

Luc

@richardwonka
Copy link
Author

Hey Luc,,

my use case is that I want to migrate some of the configuration from my legacy system into a new one, but not all of it, but I realise I haven't worded the issue heading well.

It would greatly improve readability and writeability of vars.yml if it used variable names/parameters that are consistent with what satellite uses already.

Examples are

| vars.yml      | hammer output |

| name          | Name          |
| gateway       | Gateway Addr  |
| dns_primary   | Primary DNS   |
[...] 

Consistent naming would change very little in what vars.yml looks like, but would allow reuse of hammer's output where possible. - I am guessing here that you would also prefer less gawking in your life :-)

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

No branches or pull requests

2 participants