-
Notifications
You must be signed in to change notification settings - Fork 765
Fix in sebool ansible #11245
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 in sebool ansible #11245
Conversation
|
Hi @rumch-se. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
marcusburghardt
left a comment
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.
Besides my comments regarding Bash and Ansible alignment, I wonder if installing packages in this template are not too much. It would be probably more flexible to create (or use the already existing rules) to install packages and keep this template focusing only in SELinux booleans.
|
Hello @marcusburghardt +++ 2/ 3/ Have a nice day |
|
Hello @marcusburghardt I have the following question. Will this PR be merged into the planed new release ? Have a nice day |
Hi @rumch-se , thanks for pining me. I will try to review it again until tomorrow. Since the stabilization phase for |
marcusburghardt
left a comment
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 reviewed again now and included some more comments. Could you take a look, please?
| state: present | ||
|
|
||
| {{% if product == "sle15" %}} | ||
| - name: Ensure list of additional packages are installed on SLE 15 |
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.
Since we are touching this Ansible file, could you also update the tasks names in alignment to the Project Style Guide, please?
https://complianceascode.readthedocs.io/en/latest/manual/developer/04_style_guide.html#ansible
| state: present | ||
|
|
||
| {{% if product == "sle15" %}} | ||
| - name: Ensure list of additional packages are installed on SLE 15 |
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.
Since we are touching this Ansible file, could you also update all tasks names in this Playbook in alignment to the Project Style Guide, please?
https://complianceascode.readthedocs.io/en/latest/manual/developer/04_style_guide.html#ansible
| name: {{{ SEBOOLID }}} | ||
| state: "{{ var_{{{ SEBOOLID }}} }}" | ||
| persistent: yes | ||
| when: ansible_facts.selinux.status == 'enabled' |
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.
This test is used in two tasks. Maybe it would be simpler to use it once in a block and include the tasks inside this block. It would make the Playbook simpler and likely more performative.
|
Hello @marcusburghardt
Have a nice day |
It seems more tasks (if not all) could be inserted in a block with Thanks for the update. I have only some other comments about Style Guide in this Ansible playbook. |
Co-authored-by: Marcus Burghardt <2074099+marcusburghardt@users.noreply.github.com>
|
Hello @marcusburghardt |
| {{% set PACKAGE_NAME = "libsemanage-python" %}} | ||
| {{% endif %}} | ||
|
|
||
| - name: Ensure {{{ PACKAGE_NAME }}} installed |
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.
| - name: Ensure {{{ PACKAGE_NAME }}} installed | |
| - name: "{{{ rule_title }}} - Ensure {{{ PACKAGE_NAME }}} Installed" |
| state: present | ||
|
|
||
| {{% if product == "sle15" %}} | ||
| - name: "{{{ rule_title }}} - Ensure Additional Packages installed" |
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.
| - name: "{{{ rule_title }}} - Ensure Additional Packages installed" | |
| - name: "{{{ rule_title }}} - Ensure Additional Packages Installed" |
| {{% endif %}} | ||
|
|
||
| {{% if SEBOOL_BOOL %}} | ||
| - name: Set SELinux boolean {{{ SEBOOLID }}} to {{{ SEBOOL_BOOL }}} |
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.
| - name: Set SELinux boolean {{{ SEBOOLID }}} to {{{ SEBOOL_BOOL }}} | |
| - name: "{{{ rule_title }}} - Set SELinux Boolean {{{ SEBOOLID }}} to {{{ SEBOOL_BOOL }}}" |
| name: libsemanage-python | ||
| state: present | ||
| {{% endif %}} | ||
| - name: Set SELinux boolean {{{ SEBOOLID }}} accordingly |
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.
| - name: Set SELinux boolean {{{ SEBOOLID }}} accordingly | |
| - name: "{{{ rule_title }}} - Set SELinux Boolean {{{ SEBOOLID }}} Accordingly" |
Thanks @rumch-se, but you missed the other tasks in the Playbook. I proposed the all remaining changes to help you. |
|
Hello @marcusburghardt |
marcusburghardt
left a comment
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 @rumch-se
|
Code Climate has analyzed commit 4cbbaae and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 58.5%. View more on Code Climate. |
Description:
Rationale:
Review Hints:
Using automatus with template command is a good way to test changes in templates. e.g.: