-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix: Fixes for new pcs and ansible #223
fix: Fixes for new pcs and ansible #223
Conversation
Do not try to configure a resource utilization when no utilization for the resource is defined.
Fixes warning: conditional statements should not include jinja2 templating delimiters such as {{ }} or {% %}
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #223 +/- ##
==========================================
+ Coverage 68.50% 76.79% +8.28%
==========================================
Files 3 3
Lines 181 181
Branches 0 12 +12
==========================================
+ Hits 124 139 +15
+ Misses 57 42 -15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
[citest] |
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.
Thanks for removing dependency for password_hash
- name: Generate a password hash | ||
# The arg `-6` means SHA512 based algorithms. | ||
command: | ||
cmd: >- |
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 need to use cmd
parameter here
command: >-
openssl passwd
-6
-salt {{ ansible_hostname.replace('-', 'x') }}
{{ ha_cluster_hacluster_password | string }}
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.
Ansible supports providing the cmd parameter right with command
, if cmd
is the only parameter that you need to use.
0767b82
to
6aa7c7f
Compare
[citest] |
Centos-8 fails with an error that looks like a CI issue to me:
|
Right, let's ignore this and I will meanwhile look at the failure |
- name: Set hacluster password | ||
user: | ||
name: hacluster | ||
password: "{{ __ha_cluster_openssl_call_result.stdout }}" |
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.
password: "{{ __ha_cluster_openssl_call_result.stdout }}" | |
password: "{{ __ha_cluster_openssl_call_result.stdout }}" | |
no_log: 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.
I can add no_log, but is it necessary? The password is not shown, the user module hides it even without no_log:
TASK [linux-system-roles.ha_cluster : Set hacluster password] ******************
changed: [localhost] => {
"append": false,
"changed": true,
"comment": "cluster user",
"group": 189,
"home": "/var/lib/pacemaker",
"move_home": false,
"name": "hacluster",
"password": "NOT_LOGGING_PASSWORD",
"shell": "/sbin/nologin",
"state": "present",
"uid": 189
}
The filter `password_hash` is going to be deprecated since Ansible 2.19. This commit replaces the deprecated `password_hash` filter with CLI tool `openssl passwd`.
6aa7c7f
to
7080069
Compare
[citest] |
The |
This makes the role work with the upcoming version of pcs and cluster stack in general.
It also addresses the removal of password_hash filter due to removal of passlib.