ondrejhome.ha_cluster.pcs_auth (1.0.2) — module

Module for interacting with 'pcs auth'

| "added in version" 2.4 of ondrejhome.ha_cluster"

Authors: Ondrej Famera (@OndrejHome)

preview | supported by community

Install collection

Install with ansible-galaxy collection install ondrejhome.ha_cluster:==1.0.2


Add to requirements.yml

  collections:
    - name: ondrejhome.ha_cluster
      version: 1.0.2

Description

module for authenticating nodes in pacemaker cluster using 'pcs auth' for RHEL/CentOS.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Authorize node 'n1' with default user 'hacluster' and password 'testtest'
  pcs_auth:
    node_name: 'n1'
    password: 'testtest'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: authorize all nodes in ansible play to each other
  pcs_auth:
    node_name: "{{ hostvars[item]['ansible_hostname'] }}"
    password: 'testtest'
  with_items: "{{ play_hosts }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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 }}"

Inputs

    
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