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

Check for Amazon in osfamilymap to create pkg repo #67

Merged
merged 3 commits into from
Jul 16, 2021

Conversation

mdschmitt
Copy link
Contributor

Fixes #65

@@ -443,3 +448,7 @@ MacOS:
archive:
source_hash: 15132494523c2b6a89e09b2da63452c8fe587fb82fcc3fd21cc75a4aa2766644


Copy link
Member

Choose a reason for hiding this comment

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

remove the extra lines..

@@ -206,9 +206,14 @@ RedHat:
args:
config.file: /etc/prometheus/blackbox.yml
repo:
{%- if grains.os == 'Amazon' %}
{%- set releasever = salt['cmd.run']("rpm -E '%{rhel}'") %}
Copy link
Member

Choose a reason for hiding this comment

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

Indent 4 spaces, instead of 2 spaces, to line up with the block above (suggestion, not rule).

Copy link
Member

@noelmcloughlin noelmcloughlin left a comment

Choose a reason for hiding this comment

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

LGTM, two suggested updates

* Add check for Amazon Linux to osfamilymap.yaml so that the RPM package repository is properly generated.

Resolves saltstack-formulas#65
@mdschmitt
Copy link
Contributor Author

Updated. Not sure how those extra lines ended up in there. Thx for pointing that and the spacing out. Should be all good now.

Copy link
Member

@myii myii left a comment

Choose a reason for hiding this comment

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

This would be so much neater if there was an osmap.yaml available but that's not present unfortunately.

The testing should be updated though:

default-amazonlinux-2-master-py3: {extends: '.test_instance'}
# repo-amazonlinux-2-master-py3: {extends: '.test_instance'}
# amazonlinux-2-master-py3: {extends: '.test_instance'}

  • Please comment out line 170 and then uncomment line 172, which will test both the default and repo suites for Amazon.

@mdschmitt mdschmitt requested a review from a team as a code owner July 15, 2021 23:54
* this change sets things to test both the default and repo suites for Amazon Linux.

Resolves saltstack-formulas#65
@mdschmitt
Copy link
Contributor Author

is tar ...not installed on Amazon Linux by default? That makes no sense.

@mdschmitt
Copy link
Contributor Author

well, for the archive install, it's supposed to verify that.. I'm confused.

@myii
Copy link
Member

myii commented Jul 16, 2021

is tar ...not installed on Amazon Linux by default? That makes no sense.

@mdschmitt This will resolve your problem. Change the first line of this block:

{%- if grains.get('osfinger', '') in ['Oracle Linux Server-8'] %}
pkg.installed:
- name: tar
- require_in:
- archive: prometheus-clientlibs-install-{{ name }}
{%- endif %}

To:

-        {%- if grains.get('osfinger', '') in ['Oracle Linux Server-8'] %}
+        {%- if grains.get('osfinger', '') in ['Oracle Linux Server-8', 'Amazon Linux-2'] %}

@mdschmitt
Copy link
Contributor Author

I'll admit, I could've found that out eventually, but I really appreciate your help. Updated and pushed. Thank you!

@mdschmitt
Copy link
Contributor Author

...and pipeline success!

@myii myii merged commit f9c4e46 into saltstack-formulas:master Jul 16, 2021
@myii
Copy link
Member

myii commented Jul 16, 2021

I'll admit, I could've found that out eventually, but I really appreciate your help. Updated and pushed. Thank you!

@mdschmitt You're welcome. And thank you for your excellent contribution!

@saltstack-formulas-travis

🎉 This PR is included in version 5.5.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

[FEATURE] Amazon Linux 2 pkg repo support
4 participants