Git Product home page Git Product logo

community.sap_libs's Introduction

Community SAP_LIBS Collection

This repository contains the community.sap_libs Ansible Collection. The collection includes modules and plugins supported by the Ansible SAP community to help SAP landscape management.

This collection is migrated from ansbile-collections/community.sap to sap-linuxlab/community.sap_libs.

SAP Module Collection for Ansible

CI Codecov

Code of Conduct

We follow the Ansible Code of Conduct in all our interactions within this project.

If you encounter abusive behavior, please refer to the policy violations section of the Code for information on how to raise a complaint.

Communication

We announce releases and important changes through Ansible's The Bullhorn newsletter. Be sure you are subscribed.

Join us in the #ansible (general use questions and support), #ansible-community (community and collection development questions), and other Matrix/LiberaChat IRC channels.

We take part in the global quarterly Ansible Contributor Summit virtually or in-person. Track The Bullhorn newsletter and join us.

For more information about communication, refer to the Ansible Communication guide.

Contributing to this collection

The content of this collection is made by people like you, a community of individuals collaborating on making the world better through developing automation software.

We are actively accepting new contributors.

Any kind of contribution is very welcome.

You don't know how to start? Refer to our contribution guide!

We use the following guidelines:

Collection maintenance

The current maintainers are listed in the MAINTAINERS file. If you have questions or need help, feel free to mention them in the proposals.

To learn how to maintain / become a maintainer of this collection, refer to the Maintainer guidelines.

Governance

The process of decision making in this collection is based on discussing and finding consensus among participants.

Every voice is important. If you have something on your mind, create an issue or dedicated discussion and let's discuss it!

Tested with Ansible and the following Python versions

Tested Ansible versions:

  • 2.13
  • 2.14
  • 2.15
  • 2.16
  • devel

Tested Python versions:

  • 3.6
  • 3.7
  • 3.8
  • 3.9
  • 3.10
  • 3.11

Due to SAP licensing and hardware requirements, integration tests are momentarily not feasible. The modules are tested manually against SAP systems until we found a solution or have some modules where we are able to execute integration test we decided to disable these tests.

The test support for Ansible versions 2.9 - 2.12 is disabled due to eol of these versions. The modules may work with these versions but are not tested.

External requirements

For some modules the below requirements are needed on the host that executes a module.

  • pyrfc >= 2.4.0
  • SAPCAR
  • SAPCONTROL

Supported connections

Included content

Using this collection

Installing the Collection from Ansible Galaxy

Before using this collection, you need to install it with the Ansible Galaxy command-line tool:

ansible-galaxy collection install community.sap_libs

You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: community.sap_libs

Note that if you install the collection from Ansible Galaxy, it will not be upgraded automatically when you upgrade the ansible package. To upgrade the collection to the latest available version, run the following command:

ansible-galaxy collection install community.sap_libs --upgrade

You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version 1.0.0:

ansible-galaxy collection install community.sap_libs:==1.0.0

See Ansible Using collections for more details.

Release notes

See the changelog.

Releasing, Versioning and Deprecation

This collection follows Semantic Versioning. More details on versioning can be found in the Ansible docs.

We plan to regularly release new minor or bugfix versions once new features or bugfixes have been implemented.

Releasing the current major version happens from the main branch. We will create a stable-1 branch for 1.x.y versions once we start working on a 2.0.0 release, to allow backporting bugfixes and features from the 2.0.0 branch (main) to stable-1.

For reference have a look at the issue Releasing, Versioning and Deprecation.

Roadmap

Please have a look at the project board.

More information

Licensing

Apache License, Version 2.0

See LICENSE to see the full text.

community.sap_libs's People

Contributors

rainerleber avatar stm85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

community.sap_libs's Issues

sap_control_exec unsupported functions

Summary

sap_control_exec module uses the XML api. The documentation is kind of missleading as the e.g.StartWait is not available in in the wsdl output.

The supported functions are:

Start
Stop
Shutdown
InstanceStart
InstanceStop
Bootstrap
ParameterValue
GetProcessList
GetProcessList2
GetStartProfile
GetTraceFile
GetAlertTree
GetAlerts
RestartService
StopService
GetEnvironment
ListDeveloperTraces
ListLogFiles
ReadDeveloperTrace
ReadLogFile
AnalyseLogFile
ConfigureLogFileList
GetLogFileList
RestartInstance
SendSignal
GetVersionInfo
GetQueueStatistic
GetInstanceProperties
OSExecute
AnalyseLogFiles
GetAccessPointList
GetSystemInstanceList
StartSystem
StopSystem
RestartSystem
AccessCheck
GetProcessParameter
SetProcessParameter
SetProcessParameter2
ShmDetach
CreateSnapshot
ReadSnapshot
ListSnapshots
DeleteSnapshots
RequestLogonFile
GetNetworkId
GetSecNetworkId
UpdateSystem
GetSystemUpdateList
UpdateSCSInstance
ABAPReadSyslog
ABAPReadRawSyslog
ABAPGetWPTable
ABAPAcknoledgeAlerts
CMGetThreadList
ICMGetConnectionList
ICMGetCacheEntries
ICMGetProxyConnectionList
WebDispGetServerList
WebDispGetGroupList
WebDispGetVirtHostList
WebDispGeUrlPrefixList
EnqGetLockTable
EnqRemoveLocks
EnqGetStatistic

Issue Type

Bug Report

Component Name

sap_control_exec

Ansible Version

$ ansible --version

community.sap_libs Version

$ ansible-galaxy collection list community.sap_libs

Configuration

$ ansible-config dump --only-changed

OS / Environment

No response

Steps to Reproduce

    - name: Start SAP Instance
      community.sap_libs.sap_control_exec:
        hostname: "{{ ansible_host }}"
        sysnr: "{{ instancenr }}"
        function: StartWait
        parameter: "300 2"
        username: "{{ username }}"
        password: "{{ password }}"

Expected Results

Wait until started

Actual Results

fatal: []: FAILED! => {"changed": false, "error": "Method not found: 'SAPControl.SAPControl.StartWait'", "msg": "Something went wrong connecting to the SAPCONTROL SOAP API.", "out": {}}

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Module to manage ICF services

Summary

A module to activate oder deactivate ICF services

Issue Type

Feature Idea

Component Name

sicf, pyrfc

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Run SAP task lists with a variant

Summary

We're automating the bootstraping of an SAP application server with ansible and DevOps. We're able to create the server, install OS, install SAP application instance with SWPM, update profiles and restart it. To finish this initial setup we want to run a task list we've created in the SAP system using community.sap_libs.sap_task_list_execute module but it looks like there is no option to specify a variant. I see it's possible to pass parameters to an specific step, but in our case we should run the step twice so how to identify each one. As example, these are two steps:

CL_STCT_CREATE_LOGONGROUP --> with defaults to add server in PUBLIC logon group and parallel_generators RFC group
CL_STCT_CREATE_LOGONGROUP --> to add to an additional RFC server named 390

Any idea ?

Issue Type

Feature Idea

Component Name

community.sap_libs ansible module

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Enable SNC encrypted connections in sap_pyrfc

Summary

I'd love to use this sap_pyrfc module to automate SAP tasks using Ansible. But our systems only allow RFC calls via SNC encrypted connections. It seems that community.sap_libs.sap_pyrfc is not supporting this.

When I try to specify SNC parameters (as documented in https://sap.github.io/PyRFC/pyrfc.html) in my ansible playbook like follows:

- name: test the pyrfc module
   community.sap_libs.sap_pyrfc:
     function: DELIVERY_GET_COMPONENT_RELEASE
     parameters:
       IV_COMPNAME: "SAP_BASIS"
     connection:
       ashost: my.sap.as.host
       sysid: SID
       sysnr: "01"
       client: "000"
       user: USERNAME
       passwd: PWD
       snc_qop: Privacy Protection
       snc_myname: SNCNAME
       snc_partnername: SNCPARTNERNAME
       lang: EN

I get an error message telling me that I'm using unsupported parameters:

"Unsupported parameters for (community.sap_libs.sap_pyrfc) module: snc_myname, snc_partnername, snc_qop found in connection. Supported parameters include: ashost, client, lang, passwd, sysid, sysnr, user"

Is it planned to add SNC support to sap_pyrfc module any time soon?

Kind regards
Benny

Issue Type

Feature Idea

Component Name

community.sap_libs.sap_pyrfc

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

sap_system_facts must be run on SAP machine: undocumented, doesn't fail if not

Summary

Apparently the modules can be run on any machine (e.g. delegate_to: localhost) except for sap_system_facts, which (according to the source) looks on the managed node it is executed on.

Furthermore, in such a case it just returns successfully without producing facts, I'd expect a task failure if there's no SAP on that host

Issue Type

Bug Report

Component Name

community.sap_libs.sap_system_facts

Ansible Version

$ ansible --version
ansible [core 2.15.0]

community.sap_libs Version

$ ansible-galaxy collection list community.sap_libs
1.4.1

Configuration

No response

OS / Environment

AAP 2.4 / AAC 4.4.7

Steps to Reproduce

- hosts: localhost
  gather_facts: false
  tasks:
  - community.sap_libs.sap_system_facts:
    ignore_errors: true

  - community.sap_libs.sap_system_facts:
      conn_host: sap.example.com
      conn_username: admin
      conn_password: password

Expected Results

  1. a task failure
  2. a task success

Actual Results

No response

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

sap_hdbsql module: SECURE Connection

Summary

Hi,

The configured trusted Part

    if encrypted is True:
        command.extend([' -attemptencrypt'])

could not work from my perspektive in most of the cases.

ERROR in our Landscape:

/usr/sap/HDB/HDB00/exe/hdbsql -e -attemptencrypt -n localhost -i 00 -d HDB-u SYSTEM -p 'password' "\s"

==============================================================================
== SECURITY WARNING: The encrypted communication attempt failed. Retrying   ==
==                   the connection attempt without encryption options.     ==
==============================================================================

I've changed the module part to the following one

    if encrypted is True:
        command.extend(['-e' , '-ssltrustcert', '-sslcreatecert'])

this solution is working fine in our landscape

Issue Type

Feature Idea

Component Name

hdbsql

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Add SNC string to sap_user.py

Summary

Would it be possible to add the SNC string as an optional field to the sap_user.py script?

Issue Type

Feature Idea

Component Name

sap_user.py

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Update Readme.md with correct links

Summary

on the Readme.md are links to the documentation on the ansible webpage. Please update the correct URLs, because the current links are incorrect

Issue Type

Documentation Report

Component Name

all modules

Ansible Version

$ ansible --version

Community.sap_libs Version

$ ansible-galaxy collection list community.sap_libs

Configuration

$ ansible-config dump --only-changed

OS / Environment

No response

Additional Information

No response

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

sap_control_exec: "TypeError: 'NoneType' object is not iterable"

Summary

When I use the sapcontrol (or even the sap_control_exec) module to stop or start the SAP instance or the sapstartsrv service (Stop, Start, RestartService, ...) I get the error mentioned in the title. Other functions such as GetProcessList or ParameterValue work fine, just stopping, starting, restarting are erroneous.

Issue Type

Bug Report

Component Name

sapcontrol.py

Ansible Version

$ ansible --version
ansible [core 2.13.3]
  config file = /home/webeda/ansible/ansible.cfg
  configured module search path = ['/home/webeda/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/webeda/ansible-env/lib/python3.8/site-packages/ansible
  ansible collection location = /home/webeda/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/webeda/ansible-env/bin/ansible
  python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
  jinja version = 3.1.2
  libyaml = True

community.sap_libs Version

$ ansible-galaxy collection list community.sap_libs
Collection         Version
------------------ -------
community.sap_libs 1.2.0

Configuration

$ ansible-config dump --only-changed

OS / Environment

No response

Steps to Reproduce

---
- hosts: all
  become: true
  tasks:
    - name: Test SAPControl
      community.sap_libs.sapcontrol:
        function: RestartService
        sysnr: 20
        username: <sid>adm
        password: <password>

Expected Results

The sapstartsrv service should be restarted.

Actual Results

TASK [Test SAPControl] *****************************************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: 'NoneType' object is not iterable
fatal: [<hostname>]: FAILED! => {"changed": false, "module_stderr": "Shared connection to <ip_address> closed.
", "module_stdout": "Traceback (most recent call last):
  File \"/home/<ansible_user>/.ansible/tmp/ansible-tmp-1663326779.0265872-1126214-128689101340854/AnsiballZ_sapcontrol.py\", line 107, in <module>
    _ansiballz_main()
  File \"/home/<ansible_user>/.ansible/tmp/ansible-tmp-1663326779.0265872-1126214-128689101340854/AnsiballZ_sapcontrol.py\", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File \"/home/<ansible_user>/.ansible/tmp/ansible-tmp-1663326779.0265872-1126214-128689101340854/AnsiballZ_sapcontrol.py\", line 48, in invoke_module
    run_name='__main__', alter_sys=True)
  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code
    exec(code, run_globals)
  File \"/tmp/ansible_community.sap_libs.sapcontrol_payload_ccrn_dns/ansible_community.sap_libs.sapcontrol_payload.zip/ansible_collections/community/sap_libs/plugins/modules/sapcontrol.py\", line 389, in <module>
  File \"/tmp/ansible_community.sap_libs.sapcontrol_payload_ccrn_dns/ansible_community.sap_libs.sapcontrol_payload.zip/ansible_collections/community/sap_libs/plugins/modules/sapcontrol.py\", line 379, in main
  File \"/tmp/ansible_community.sap_libs.sapcontrol_payload_ccrn_dns/ansible_community.sap_libs.sapcontrol_payload.zip/ansible_collections/community/sap_libs/plugins/modules/sapcontrol.py\", line 297, in recursive_dict
  File \"/usr/lib/python3.6/site-packages/suds/sudsobject.py\", line 51, in asdict
    return dict(items(sobject))
  File \"/usr/lib/python3.6/site-packages/suds/sudsobject.py\", line 38, in items
    for item in sobject:
TypeError: 'NoneType' object is not iterable
", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

How to specify field selection

Summary

Can I get more information about "community.sap_libs.sap_pyrfc module"?
I want to retrieve RFC information from table RFCDES. However, I'm getting "DATA_BUFFER_EXCEEDED" exception when I didn't specify/limit the data field.

https://docs.ansible.com/ansible/latest/collections/community/sap_libs/sap_pyrfc_module.html#ansible-collections-community-sap-libs-sap-pyrfc-module

Issue Type

Documentation Report

Component Name

community.sap_libs.sap_pyrfc module

Ansible Version

$ ansible --version

ansible [core 2.13.12]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /django/TC/lib/python3.8/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /django/TC/bin/ansible
python version = 3.8.5 (default, Oct 4 2023, 01:49:42) [GCC 4.8.5]
jinja version = 3.1.2
libyaml = True

Community.sap_libs Version

$ ansible-galaxy collection list community.sap_libs

# /django/TC/lib/python3.8/site-packages/ansible_collections
Collection         Version
------------------ -------
community.sap_libs 1.4.0

# /root/.ansible/collections/ansible_collections
Collection         Version
------------------ -------
community.sap_libs 1.4.1



### Configuration

```console (paste below)
$ ansible-config dump --only-changed

DEFAULT_CALLBACK_PLUGIN_PATH(/etc/ansible/ansible.cfg) = ['/Playbooks/Automation/run/callbacks']
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 10
DEFAULT_LOAD_CALLBACK_PLUGINS(/etc/ansible/ansible.cfg) = True
DEFAULT_STRATEGY(/etc/ansible/ansible.cfg) = free
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 45
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False

OS / Environment

SLES

Additional Information

No response

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Releasing, Versioning and Deprecation

Summary

Introduction
This issue describes how and when community.sap_libs is released, and to announce updates to the release/versioning schedule. The next section (Next release) is always updated to contain the next version to be released. Most other changes to this first post are always announced by separate posts in this issue.

Next release
1.0.0 around April 24th

Releasing schedule for major and minor versions
2022-04-24: 1.0.0

From then on:

release minor versions every two months shortly before Ansible releases, i.e. roughly every three weeks

major versions every 6 months.

If no new commit has been merged for a minor release, it must be skipped. Major versions must not be skipped.

The schedule for minor versions might be adjusted in the future (maybe once per month, maybe something else). The release schedule for patch versions (see below) would be adjusted.

Releasing schedule for patch versions

Patch versions x.y.z until the last minor release of a major release branch will only be released when necessary. The intended frequency is never, they are reserved for packaging failures, or fixing major breakage / security problems.
Once the last minor release of a major release branch (usually x.2.0, generally x.Y.0) has been released, there will be bugfix releases x.Y.z.
These releases will happen every two months and when necessary.
Versioning

galaxy.yml in the main branch will always contain the version of the next major or minor release. It will be updated right after a release.
version_added needs to be used for every new feature and module/plugin, and needs to coincide with the next minor/major release version. (This will eventually be enforced by CI.)
Branching

Releasing minor and major releases is done from stable-x branches.

Shortly (usually a few hours) before a new major release, stable-x is branched.

Once a new major version is released, there will be no more minor releases for previous stable-x branches.

From then on, only bugfixes are allowed for ~6 months

After that, only major bugfixes security fixes are allowed for another ~12 months (backporting to the current three major releases).

New features must not break backwards compatibility!

Deprecation

Deprecations are done by version number (not by date).
New deprecations can be added during every minor release, under the condition that they do not break backwards compatibility.
Deprecations are expected to have a deprecation cycle of at least 2 major versions (i.e. ~1 year). Maintainers can use a longer deprecation cycle if they want to support the old code for that long.
Changelogs

Every change that does not only affect docs or tests must have a changelog fragment.

Exception: fixing/extending a feature that already has a changelog fragment and has not yet been released. Such PRs must always link to the original PR(s) they update.
Use your common sense!
(This might change later. The trivial category should then be used to document changes which are not important enough to end up in the text version of the changelog.)
Fragments must not be added for new module PRs and new plugin PRs. The only exception are test and filter plugins: these are not automatically documented yet.
The (x+1).0.0 changelog continues the x.0.0 changelog.

A x.y.0 changelog with y > 0 is not part of a changelog of a later X.. (with X > x) or x,Y,* (with Y > y) release.
A x.y.z changelog with z > 0 is not part of a changelog of a later (x+1).. or x.Y.z (with Y > y) release.
Since everything adding to the minor/patch changelogs are backports, the same changelog fragments of these minor/patch releases will be in the next major release's changelog. (This is the same behavior as in ansible/ansible.)
Changelogs do not contain previous major releases, and only use the ancestor feature (in changelogs/changelog.yaml) to point to the previous major release.

Changelog fragments are removed after a release is made.

Community package requirements: sanity tests

Summary

(Note: This issue was filed in a semi-automated fashion. Let me know if you see errors in this issue.)

As per the Ansible community package inclusion requirements, collections must pass ansible-test sanity tests. Version 1.4.1 of community.sap_libs, corresponding to the 1.4.1 tag in this repo, fails one or more of the required sanity tests.

Please see the errors below and address them. If these issues aren't addressed within a reasonable time period, the collection may be subject to removal from Ansible.

Thank you for your efforts and for being part of the Ansible package! We appreciate it.


Sanity tests

The following tests were run using ansible-test version 2.16.1:

  • ansible-doc
  • compile
  • validate-modules
  • yamllint

Note that this is only a subset of the required sanity tests. Please make sure you run them in all in your CI.

Results

๐Ÿ’ก NOTE:

Check the [explain] links below for more information about each test and how to fix failures.
See Sanity Tests: Ignores in the dev guide if, after reading the test-specific documentation, you still believe an error is a false positive.

The test ansible-test sanity --test validate-modules [explain] failed with 9 errors:

plugins/modules/sap_company.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/sap_control_exec.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/sap_hdbsql.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/sap_pyrfc.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/sap_snote.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/sap_system_facts.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/sap_task_list_execute.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/sap_user.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/sapcar_extract.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module

Issue Type

Bug Report

Component Name

n/a

Ansible Version

n/a

community.sap_libs Version

n/a

Configuration

n/a

OS / Environment

n/a

Steps to Reproduce

n/a

Expected Results

n/a

Actual Results

n/a

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Consider using true/false for all booleans in docs

Based on the community decision to use true/false for boolean values in documentation and examples, we ask that you evaluate booleans in this collection and consider changing any that do not use true/false (lowercase).

See documentation block format for more info (specifically, option defaults).

If you have already implemented this or decide not to, feel free to close this issue.


P.S. This is auto-generated issue, please raise any concerns here

Module strust

Summary

A module which manage certificates with strust

Issue Type

Feature Idea

Component Name

strust, pyrfc

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

ERROR: "msg": "Failed to import the required Python library (pyrfc) on HOST

Summary

I have a Ansible CONTROL Node with:
python version: Python 3.8.10
pyrfc version: 2.7.0

And a ansible "SAP NW" Node with:
OS: SLES 15 SP2
Python 3.6.15
pyrfc: missing

When try to use the module "community.sap_libs.sap_user" to create a new USER I have the error:

"msg": "Failed to import the required Python library (pyrfc) on myhostname's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"

Question1: Do I need to install the pyrfc even on SAP NW host ? (because this is not possible now)
QUestion2: How to correct the error ?
THX

Issue Type

Bug Report

Component Name

sap_user

Ansible Version

$ ansible --version
ansible [core 2.13.1]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/ubuntu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ubuntu/.local/lib/python3.8/site-packages/ansible
  ansible collection location = /home/ubuntu/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/ubuntu/.local/bin/ansible
  python version = 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0]
  jinja version = 3.1.2
  libyaml = True

community.sap_libs Version

$ ansible-galaxy collection list community.sap_libs
Collection         Version
------------------ -------
community.sap_libs 1.1.0

# /home/ubuntu/.ansible/collections/ansible_collections
Collection         Version
------------------ -------
community.sap_libs 1.4.0

Configuration

$ ansible-config dump --only-changed
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto

OS / Environment

Source OS (Ansible Control Node): Ubuntu 20.04.5 LTS
Target OS (SAP NW): SLES 15 SP2

Steps to Reproduce

---
  - name: SAP_USER
    hosts: SAP_S4HANA
    tasks:
        - name: Create SAP User
          community.sap_libs.sap_user:
            conn_username: 'ADMIN'
            conn_password: 'MyAdminPSWD'
            host: myhostname
            sysnr: '00'
            client: '200'
            state: present
            username: ANSIBLE
            firstname: first_admin
            lastname: last_admin
            email: [email protected]
            password: Test123456
            useralias: ANSIBLE-ADMIN
            company: DEFAULT_COMPANY
            roles:
              - "SAP_ALL"

Expected Results

Error
NA

Actual Results

NA

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Something went wrong connecting to the SAPCONTROL SOAP API

Summary

I am sorry in advance, cuz this might be not a Bug.
I don't know.

I wanted to make an simple Playbook which is tryin' to get the Status of the SAP Process but on this particular Server i get following.

On some other Server i get an successful output.

I would appreciate to get some help.

Playbook:

- name: GetProcessList with sysnr
  hosts: all
  become: false

  collections:
    - community.sap_libs

  tasks:
    - name: Execute SAP Control Command
      community.sap_libs.sap_control_exec:
        sysnr: "01"
        function: "GetProcessList"

Issue Type

Bug Report

Component Name

apt

Ansible Version

ansible [core 2.15.8]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/usr/share/my_modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/edv/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

community.sap_libs Version

# /home/edv/.ansible/collections/ansible_collections
Collection         Version
------------------ -------
community.sap_libs 1.4.1

# /usr/lib/python3/dist-packages/ansible_collections
Collection         Version
------------------ -------

Configuration

COLOR_CHANGED(/etc/ansible/ansible.cfg) = yellow
COLOR_DEBUG(/etc/ansible/ansible.cfg) = dark gray
COLOR_DEPRECATE(/etc/ansible/ansible.cfg) = purple
COLOR_DIFF_ADD(/etc/ansible/ansible.cfg) = green
COLOR_DIFF_LINES(/etc/ansible/ansible.cfg) = cyan
COLOR_DIFF_REMOVE(/etc/ansible/ansible.cfg) = red
COLOR_ERROR(/etc/ansible/ansible.cfg) = red
COLOR_HIGHLIGHT(/etc/ansible/ansible.cfg) = white
COLOR_OK(/etc/ansible/ansible.cfg) = green
COLOR_SKIP(/etc/ansible/ansible.cfg) = cyan
COLOR_UNREACHABLE(/etc/ansible/ansible.cfg) = red
COLOR_VERBOSE(/etc/ansible/ansible.cfg) = blue
COLOR_WARN(/etc/ansible/ansible.cfg) = bright purple
CONFIG_FILE() = /etc/ansible/ansible.cfg
DEFAULT_ASK_PASS(/etc/ansible/ansible.cfg) = False
DEFAULT_BECOME(/etc/ansible/ansible.cfg) = True
DEFAULT_BECOME_ASK_PASS(/etc/ansible/ansible.cfg) = True
DEFAULT_BECOME_METHOD(/etc/ansible/ansible.cfg) = sudo
DEFAULT_BECOME_USER(/etc/ansible/ansible.cfg) = edv
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 5
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
DEFAULT_LOCAL_TMP(/etc/ansible/ansible.cfg) = /home/edv/.ansible/tmp/ansible-local-209302ppkadpem
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
DEFAULT_MODULE_PATH(/etc/ansible/ansible.cfg) = ['/usr/share/my_modules']
DEFAULT_MODULE_UTILS_PATH(/etc/ansible/ansible.cfg) = ['/usr/share/my_module_utils']
DEFAULT_POLL_INTERVAL(/etc/ansible/ansible.cfg) = 15
DEFAULT_REMOTE_PORT(/etc/ansible/ansible.cfg) = 22
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 10
DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = smart
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False

OS / Environment

Ansible Controller: Ubuntu Server
Target host: SUSE Linux Enterprise Server 15 SP4

Steps to Reproduce

Expected Results

I should get an Response if the process is running or not.

Actual Results

Error:

{
    "changed": false,
    "out": {},
    "error": "",
    "failed": true,
    "msg": "Something went wrong connecting to the SAPCONTROL SOAP API.",
    "invocation": {
        "module_args": {
            "sysnr": "01",
            "function": "GetProcessList",
            "hostname": "localhost",
            "force": false,
            "port": null,
            "username": null,
            "password": null,
            "parameter": null
        }
    }
}

Full Error log file:

TEST2.txt

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Using sap control

Summary

Dear guys,

I try to use sapcontrol module to stop sap system look like:

  • name: Restart the system with 'sapcontrol -function RestartSystem'
    community.sap_libs.sapcontrol:
    sysnr: '00'
    function: StopSystem
    parameter: '0'

The task returns the error:

atal: [sappifprdap]: FAILED! => {
"changed": false,
"error": "Server raised fault: 'Validation constraint violation: invalid value in element 'softtimeout''",
"invocation": {
"module_args": {
"force": false,
"function": "StopSystem",
"hostname": "localhost",
"parameter": "0",
"password": null,
"port": null,
"sysnr": "01",
"username": null
}
},
"msg": "Something went wrong connecting to the SAPCONTROL SOAP API.",
"out": {}
}

How I can pass arguments into the parameter 'parameter'? Would you explain this topic, please?

Best regards,
Mikhail

Issue Type

Documentation Report

Component Name

community.sap_libs.sapcontrol

Ansible Version

$ ansible --version

Community.sap_libs Version

$ ansible-galaxy collection list community.sap_libs

Collection Version


community.sap_libs 1.1.0

Configuration

$ ansible-config dump --only-changed

OS / Environment

No response

Additional Information

No response

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.