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

Update tests to use Hiera 5 #1158

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

cocker-cc
Copy link
Contributor

  • migrate Fixtures-Hiera to Hiera 5
  • sort YAML-Files alphabetically

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

@cocker-cc cocker-cc force-pushed the Migrate_to_Hiera_5 branch from cbea974 to 0b0cf87 Compare April 14, 2022 23:08
@cocker-cc cocker-cc force-pushed the Migrate_to_Hiera_5 branch 2 times, most recently from 83287a1 to 0a68fb4 Compare April 14, 2022 23:23
@smortex smortex changed the title Migrate to Hiera 5 Update tests to use Hiera 5 Apr 15, 2022
Copy link
Member

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Have you used some tool to rewrite the yaml files? I think that the explicit ~ in better than emptiness, and some quoting was changed, but I can live with this. I started to work on a tool that focus on sorting YAML files but keep comments and values the way they are written, maybe you used something i am looking for?

@cocker-cc
Copy link
Contributor Author

cocker-cc commented Apr 15, 2022

Looks good. Have you used some tool to rewrite the yaml files? I think that the explicit ~ in better than emptiness, and some quoting was changed, but I can live with this. I started to work on a tool that focus on sorting YAML files but keep comments and values the way they are written, maybe you used something i am looking for?

The "Tool" I used is "25 Lines of plain Ruby": read in the YAML, sort the Keys with the Exception of lookup_options, which come to the Top, and then write out the YAML.
To my Convenience I use Vim with this Command:

for f in $(find data -type f -name '*.yaml'); do ~/bin/hiera-sort.rb "$f" | vim -c "vsp $f" -; done

Too bad, the Comments have to get migrated manually.

@smortex
Copy link
Member

smortex commented Apr 20, 2022

@cocker-cc just released yaml-sort if you want to give it a try 😜

@cocker-cc
Copy link
Contributor Author

@cocker-cc just released yaml-sort if you want to give it a try stuck_out_tongue_winking_eye

This looks very well implemented. Is there a Place to discuss it?

@smortex
Copy link
Member

smortex commented Apr 23, 2022

This looks very well implemented. Is there a Place to discuss it?

@cocker-cc I opened issues on the project page ;-)

@cocker-cc cocker-cc force-pushed the Migrate_to_Hiera_5 branch from 0a68fb4 to 296acf6 Compare July 23, 2022 10:25
- oracle-7-x64
- ubuntu-server-1404-x64
- ubuntu-server-1604-x64
- amazonlinux-1-x64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm quite sure this file isn't used anymore and can be deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, But this is not Subject, of this PR.

elasticsearch::api_basic_auth_username: ~
elasticsearch::api_ca_file: ~
elasticsearch::api_ca_path: ~
elasticsearch::api_basic_auth_password:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if something is undef, it doesn't need to be added to hiera at all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if something is undef, it doesn't need to be added to hiera at all

Not without adding = undef, to the Class-Parameter.
Anyhow. This is not Subject, of this PR.

- migrate Fixtures-Hiera to Hiera 5
- sort YAML-Files alphabetically
@bastelfreak bastelfreak added the enhancement New feature or request label Oct 17, 2022
@bastelfreak bastelfreak merged commit 8d671e1 into voxpupuli:master Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants