-
Notifications
You must be signed in to change notification settings - Fork 2
Use repository modules instead of copy
#16
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -17,21 +17,17 @@ | |||||||||||||||||||
ternary(ansible_distribution + 'Linux', ansible_distribution) }} | ||||||||||||||||||||
- name: Add the Okta ASA repo | ||||||||||||||||||||
ansible.builtin.copy: | ||||||||||||||||||||
# yamllint complains about the length of a few of the lines below, | ||||||||||||||||||||
ansible.builtin.yum_repository: | ||||||||||||||||||||
# yamllint complains about the length of a couple of the lines below, | ||||||||||||||||||||
# but there is no way to shorten them. | ||||||||||||||||||||
# | ||||||||||||||||||||
# yamllint disable rule:line-length | ||||||||||||||||||||
Comment on lines
+20
to
24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can remove the
Suggested change
|
||||||||||||||||||||
content: | | ||||||||||||||||||||
[oktapam-stable] | ||||||||||||||||||||
name=Okta PAM Stable - {{ ansible_distribution_tweaked }} {{ ansible_distribution_major_version }} | ||||||||||||||||||||
baseurl=https://dist.scaleft.com/repos/rpm/stable/{{ ansible_distribution_tweaked | lower }}/{{ ansible_distribution_major_version }}/$basearch | ||||||||||||||||||||
gpgcheck=1 | ||||||||||||||||||||
repo_gpgcheck=1 | ||||||||||||||||||||
enabled=1 | ||||||||||||||||||||
gpgkey=https://dist.scaleft.com/GPG-KEY-OktaPAM-2023 | ||||||||||||||||||||
baseurl: https://dist.scaleft.com/repos/rpm/stable/{{ ansible_distribution_tweaked | lower }}/{{ ansible_distribution_major_version }}/$basearch | ||||||||||||||||||||
description: Okta PAM Stable - {{ ansible_distribution_tweaked }} {{ ansible_distribution_major_version }} | ||||||||||||||||||||
Comment on lines
+25
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ...if you make these changes:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thoughts on changing the description to: Okta PAM Stable - {{ ansible_distribution_tweaked }}
{{ ansible_distribution_major_version }} Since that still maintains the desired format without having to chop into the substitution. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's fine. |
||||||||||||||||||||
# Re-enable the line-length yamllint rule. | ||||||||||||||||||||
# | ||||||||||||||||||||
# yamllint enable rule:line-length | ||||||||||||||||||||
Comment on lines
27
to
29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be removed too:
Suggested change
|
||||||||||||||||||||
dest: /etc/yum.repos.d/oktapam-stable.repo | ||||||||||||||||||||
mode: u=rw,g=,o= | ||||||||||||||||||||
gpgcheck: true | ||||||||||||||||||||
gpgkey: https://dist.scaleft.com/GPG-KEY-OktaPAM-2023 | ||||||||||||||||||||
name: oktapam-stable | ||||||||||||||||||||
repo_gpgcheck: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we would use
ansible.builtin.deb822_repository
where possible. See, for example, here.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was planning to add that functionality in a follow-up PR though I was going to follow the logic in cisagov/ansible-role-backports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this happening in a follow-on PR.
The nice thing about the example I provided is that it only checks for the presence of Buster. That means the logic will still work as written as new Debian versions are released. Or is there another reason to prefer the logic in the backports role?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason to prefer it, I would just prefer we be consistent. I knew backports role did a similar split-config with some getting DEB822 and some getting classic which is why I was using it as a reference. I was more just mentioning that my original intent was to use that logic and not arguing in favor of that logic.