sap.sap_operations.pcs_auth module – Module for managing cluster node authorization with ‘pcs auth’ commands
Note
This module is part of the sap.sap_operations collection.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install sap.sap_operations
.
To use it in a playbook, specify: sap.sap_operations.pcs_auth
.
Synopsis
Module for managing cluster node authorization with ‘pcs auth’ commands
Parameters
Parameter |
Comments |
---|---|
hostname of node for authentication |
|
password for cluster authentication |
|
path to pcsd configuration file only required if pcsd configuration file is in unusual location or for testing Default: |
|
‘present’ authenticates the node while ‘absent’ will remove the node authentication node from which this is run is (de)authenticated against the node specified in ‘node_name’ Choices:
|
|
username of user for cluster authentication Default: |
Notes
Note
This module is (de)authenticating nodes only 1-way == authenticating node 1 against node 2 doesn’t mean that node 2 is authenticated against node 1!
This module is community supported
Module interface (parameters, output) expected to be stable but not guaranteed
Module planned to be released on Ansible Automation Hub after collecting some feedback
There is no guarantee that this module will be officially supported by Red Hat
Examples
---
- name: Authorize node 'n1' with default user 'hacluster' and password 'testtest'
sap.sap_operations.pcs_auth:
node_name: 'n1'
password: 'testtest'
- name: authorize all nodes in ansible play to each other
sap.sap_operations.pcs_auth:
node_name: "{{ hostvars[item]['ansible_hostname'] }}"
password: 'testtest'
with_items: "{{ play_hosts }}"
- name: de-authorize all nodes from each other in ansible play
sap.sap_operations.pcs_auth:
node_name: "{{ hostvars[item]['ansible_hostname'] }}"
state: 'absent'
with_items: "{{ play_hosts }}"
Authors
Ondrej Famera (@OndrejHome)
Kirill Satarin (@kksat)