Skip to content

Commit

Permalink
Release galaxy-2.9.0
Browse files Browse the repository at this point in the history
Signed-off-by: kksat <[email protected]>
  • Loading branch information
kksat committed Nov 7, 2024
1 parent 32dde20 commit 3386d85
Show file tree
Hide file tree
Showing 27 changed files with 2,087 additions and 178 deletions.
358 changes: 182 additions & 176 deletions docs/CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace: sap

name: sap_operations

version: 2.8.0
version: 2.9.0

readme: README.md

Expand Down
2 changes: 2 additions & 0 deletions roles/general_preconfigure/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ general_preconfigure_packages_mapping:
- compat-sap-c++-9
- compat-sap-c++-10
- compat-sap-c++-11
- libxcrypt-compat
ppc64le:
- uuidd
- libnsl
Expand All @@ -152,6 +153,7 @@ general_preconfigure_packages_mapping:
- compat-sap-c++-10
- compat-sap-c++-11
- ibm-power-managed-rhel8
- libxcrypt-compat
s390x:
- uuidd
- libnsl
Expand Down
232 changes: 232 additions & 0 deletions roles/hana_sudoers/LICENSE

Large diffs are not rendered by default.

105 changes: 105 additions & 0 deletions roles/hana_sudoers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<!--
SPDX-License-Identifier: GPL-3.0-only
SPDX-FileCopyrightText: 2023-2024 Red Hat, Project Atmosphere
Copyright 2023-2024 Red Hat, Project Atmosphere
This program is free software: you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You should have received a copy of the GNU General Public License along with this program.
If not, see <https://www.gnu.org/licenses/>.
-->

# hana_sudoers

Manage SAP HANA sudoers records


Manage SAP HANA sudoers records
See https://access.redhat.com/articles/6093611
Role requires root access



## Role Variables

### Required parameters:



#### hana_sudoers_sids


_Type:_ `list`

_Default:_ `[]`

_Required:_ `False`
_Description:_
SAP HANA sid (system id) to configure sudoers file
Can be list of single value
If not defined or is empty list, list of installed SAP HANA instances will be determined by the role



#### hana_sudoers_state


_Type:_ `str`

_Default:_ `present`

_Required:_ `False`
_Choices:_
- present
- absent
_Description:_
Ensure records are present or absent in sudoers file



#### hana_sudoers_data_centers


_Type:_ `str`

_Default:_ `['*']`

_Required:_ `False`
_Description:_
List of data centers to create records for. By default records will not be limited to datacenter (see default value)




## Limitations

Role was tested only on x86_64 architecture
Role tested only for scaleup systems

## Dependencies

Role has no dependencies to other roles.

## Example Playbooks



## License

GPL-3.0-only

## Author Information

Kirill Satarin (@kksat)
25 changes: 25 additions & 0 deletions roles/hana_sudoers/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-FileCopyrightText: 2024 Red Hat, Project Atmosphere
#
# Copyright 2024 Red Hat, Project Atmosphere
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# You should have received a copy of the GNU General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>.

---
hana_sudoers_state: present
hana_sudoers_data_centers: ['*']
hana_sudoers_sids: []
85 changes: 85 additions & 0 deletions roles/hana_sudoers/meta/argument_specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-FileCopyrightText: 2024 Red Hat, Project Atmosphere
#
# Copyright 2024 Red Hat, Project Atmosphere
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# You should have received a copy of the GNU General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>.

---
argument_specs:
main:
short_description: Manage SAP HANA sudoers records
description:
- Manage SAP HANA sudoers records
- See https://access.redhat.com/articles/6093611
- Role requires root access
options:
hana_sudoers_sids:
description:
- SAP HANA sid (system id) to configure sudoers file
- Can be list of single value
- If not defined or is empty list, list of installed SAP HANA instances will be determined by the role
type: list
elements: str
required: false
default: []

hana_sudoers_state:
description: Ensure records are present or absent in sudoers file
type: str
choices:
- present
- absent
required: false
default: present

hana_sudoers_data_centers:
description: List of data centers to create records for. By default records will not be limited to datacenter (see default value)
type: str
required: false
default: "['*']"

__limitations__:
options: {}
short_description: Limitations
description:
- Role was tested only on x86_64 architecture
- Role tested only for scaleup systems

__dependencies__:
options: {}
short_description: Dependencies
description:
- Role has no dependencies to other roles.

__examples__:
options: {}
short_description: Example Playbooks
description:
- ""

__license__:
options: {}
short_description: License
description:
- GPL-3.0-only

__author__:
options: {}
short_description: Author Information
description:
- Kirill Satarin (@kksat)
34 changes: 34 additions & 0 deletions roles/hana_sudoers/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-FileCopyrightText: 2024 Red Hat, Project Atmosphere
#
# Copyright 2024 Red Hat, Project Atmosphere
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# You should have received a copy of the GNU General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>.

---
galaxy_info:
author: Kirill Satarin (@kksat)
description: Manage SAP HANA sudoers records
license: GPL-3.0-only
min_ansible_version: "2.15"
platforms:
- name: EL
versions:
- "8"
- "9"
galaxy_tags: []
dependencies: []
37 changes: 37 additions & 0 deletions roles/hana_sudoers/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-FileCopyrightText: 2024 Red Hat, Project Atmosphere
#
# Copyright 2024 Red Hat, Project Atmosphere
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# You should have received a copy of the GNU General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>.

---
- name: Get list of SAP instances
sap.sap_operations.host_info:
become: true
become_user: root
register: hana_sudoers_host_info
when: (hana_sudoers_sids is undefined) or (hana_sudoers_sids == [])

- name: Ensure sudoers file is configured for all SAP HANA sids
ansible.builtin.include_tasks: sudoers.yml
loop: "{{ hana_sudoers_sid_list | flatten }}"
loop_control:
loop_var: hana_sudoers_sid
vars:
hana_sudoers_sid_list: "{{ hana_sudoers_sids is defined | ternary(hana_sudoers_sids | flatten, hana_sudoers_sid_list_installed) }}"
hana_sudoers_sid_list_installed: "{{ hana_sudoers_host_info | default([]) | select('sap.sap_operations.hana_instance') }}"
22 changes: 22 additions & 0 deletions roles/hana_sudoers/tasks/noop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-FileCopyrightText: 2024 Red Hat, Project Atmosphere
#
# Copyright 2024 Red Hat, Project Atmosphere
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# You should have received a copy of the GNU General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>.

---
38 changes: 38 additions & 0 deletions roles/hana_sudoers/tasks/sudoers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-FileCopyrightText: 2024 Red Hat, Project Atmosphere
#
# Copyright 2024 Red Hat, Project Atmosphere
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# You should have received a copy of the GNU General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>.

---
- name: Make sure sudoers file is configured
ansible.builtin.lineinfile:
create: true
path: "{{ hana_sudoers_path }}"
state: "{{ hana_sudoers_state }}"
regexp: "{{ line | ansible.builtin.regex_escape }}"
line: "{{ line }}"
validate: '/usr/sbin/visudo --check --file=%s'
owner: "{{ omit }}"
group: "{{ omit }}"
mode: "{{ omit }}"
loop: "{{ hana_sudoers_file_lines }}"
loop_control:
loop_var: line
become: true
become_user: root
Loading

0 comments on commit 3386d85

Please sign in to comment.