-
Notifications
You must be signed in to change notification settings - Fork 51
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
add 'local' parameter to seport #124
Conversation
[citest] |
If we specify
Please note that
|
Correct. It is essentially doing And this is what allows you to do Not sure why it is implemented this way . . . but that's how
|
Ok..., now I'd like to learn the
[0] logging_selinux_ports variable
Additional thought... as it does users very little harm by having another local port, I have actually no problem with this issue. |
We should always use
|
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.
lgtm
I originally used local_seport as I wasn't sure whether the shipped module shipped with the role would override the collections module. But according to https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#embedding-modules-and-plugins-in-roles it should be safe to just copy in and use seport module. It would make the later transition to collection module simpler. |
I wasn't sure how Ansible would handle having two |
It works. It uses the one from the role. cp -pL .external/ansible/posix/plugins/modules/$module $role/library/$module we'll have to use cp -pL --no-clobber .external/ansible/posix/plugins/modules/$module $role/library/$module There are a few places in the spec file we'll need to do that. However, we don't need to do this unless we do a downstream release before community.general 5.6.0 is released: ansible-collections/community.general#582
So when 5.6.0 is released, I will remove the local seport.py |
community.general 5.6.0 seport now supports local - https://github.com/ansible-collections/community.general/blob/5.6.0/plugins/modules/system/seport.py#L52 |
[citest] |
[citest bad] |
[citest] |
Note that this will need a special case handling in the downstream spec file, something like this:
|
ugh - this may be a big problem for users using ansible 2.9 - as soon as you upgrade:
So, even if you don't care about I think we'll have to use Other suggestions are welcome |
`community.general.seport` has recently added the `local` parameter which is now supported by the role. - `local: true`: * `state: present` enforces change to be made even though the port mapping could already exists in built in policy * `state: absent` would remove only local modification and would not try to remove builtin mapping. The role vendors-in the seport module as `local_seport`, because otherwise it is too difficult to support both Ansible 2.9 and ansible-core. We will revisit this when Ansible 2.9 is EOL.
[citest] |
@nhosoi @bachradsusi please review again |
[1.5.0] - 2022-09-19 -------------------- ### New Features - add 'local' parameter to seport (linux-system-roles#124) `community.general.seport` has recently added the `local` parameter which is now supported by the role. - `local: true`: * `state: present` enforces change to be made even though the port mapping could already exists in built in policy * `state: absent` would remove only local modification and would not try to remove builtin mapping. The role vendors-in the seport module as `local_seport`, because otherwise it is too difficult to support both Ansible 2.9 and ansible-core. We will revisit this when Ansible 2.9 is EOL. ### Bug Fixes - none ### Other Changes - add test for fcontext seuser and selevel (linux-system-roles#120) Signed-off-by: Rich Megginson <rmeggins@redhat.com>
[1.5.0] - 2022-09-19 -------------------- ### New Features - add 'local' parameter to seport (#124) `community.general.seport` has recently added the `local` parameter which is now supported by the role. - `local: true`: * `state: present` enforces change to be made even though the port mapping could already exists in built in policy * `state: absent` would remove only local modification and would not try to remove builtin mapping. The role vendors-in the seport module as `local_seport`, because otherwise it is too difficult to support both Ansible 2.9 and ansible-core. We will revisit this when Ansible 2.9 is EOL. ### Bug Fixes - none ### Other Changes - add test for fcontext seuser and selevel (#120) Signed-off-by: Rich Megginson <rmeggins@redhat.com> Signed-off-by: Rich Megginson <rmeggins@redhat.com>
local: true
:state: present
enforces change to be made even though theport mapping could already exists in built in policy
*
state: absent
would remove only local modification and would nottry to remove builtin mapping.
Implemented using local_seport module which is copied from seport module
and update to accept
local