ondrejhome / ondrejhome.ha_cluster / 1.0.2 / module / pcs_auth Module for interacting with 'pcs auth' | "added in version" 2.4 of ondrejhome.ha_cluster" Authors: Ondrej Famera (@OndrejHome) preview | supported by communityondrejhome.ha_cluster.pcs_auth (1.0.2) — module
Install with ansible-galaxy collection install ondrejhome.ha_cluster:==1.0.2
collections: - name: ondrejhome.ha_cluster version: 1.0.2
module for authenticating nodes in pacemaker cluster using 'pcs auth' for RHEL/CentOS.
- name: Authorize node 'n1' with default user 'hacluster' and password 'testtest' pcs_auth: node_name: 'n1' password: 'testtest'
- name: authorize all nodes in ansible play to each other 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 pcs_auth: node_name: "{{ hostvars[item]['ansible_hostname'] }}" state: 'absent' with_items: "{{ play_hosts }}"
state: choices: - present - absent default: present description: - '''present'' authenticates the node while ''absent'' will remove the node authentification' - node from which this is run is (de)authenticated agains the node specified in 'node_name' required: false type: str password: description: - password of 'cluster user' for cluster authentication required: false type: str username: default: hacluster description: - username of 'cluster user' for cluster authentication required: false type: str node_name: description: - hostname of node for authentication required: true type: str