rg – manage resource groups in PowerHA cluster

Synopsis

This module creates or deletes resource group in PowerHA cluster.

Parameters

name (True, str, None)

name of the resource group.

nodes (False, list, None)

list of the nodes where the resource group can be started. required if resource group is created.

node (False, str, None)

Name of a target node where the resource group must be moved to.

Required if resource group’s state is moved and no target site is defined.

secnodes (False, list, None)

secondary nodes

added in 1.1.3

site (False, str, None)

Name of a target site where the resource group must be moved to.

Required if resource group’s state is moved and no target node is defined.

sitepolicy (False, str, None)

site policy

added in 1.1.3

startup (False, str, None)

startup policy for the resource group. One of OHN, OFAN, OAAN, or OUDP.

OHN - Online Home Node (default).

OFAN - Online on First Available Node.

OAAN - Online on All Available Nodes (concurrent).

OUDP - Online Using Node Distribution Policy.

fallover (False, str, None)

fallover policy for the resource group. One of FNPN, FUDNP, or BO.

FNPN - Fallover to Next Priority Node (default).

FUDNP - Fallover Using Dynamic Node Priority.

BO - Bring Offline (On Error Node Only).

fallback (False, str, None)

fallback policy for the resource group. One of NFB, or FBHPN.

NFB - Never Fallback.

FBHPN - Fallback to Higher Priority Node (default).

prio_policy (False, str, None)

node priority policy, if fallover set to FUDNP. One of default, mem, disk, cpu, least, most

default - next node in the nodes list.

mem - node with most available memory.

disk - node with least disk activity.

cpu - node with most cpu cycles available.

least - node where the dynamic node priority script returns the lowest value.

most - node where the dynamic node priority script returns the highest value.

added in 1.1.3

prio_policy_script (False, path, None)

path to script to determine the prio_policy

added in 1.1.3

prio_policy_timeout (False, int, None)

added in 1.1.3

service (False, list, None)

list of service labels for the resource group.

application (False, list, None)

list of application controllers for the resource group.

volgrp (False, list, None)

list of volume groups for the resource group.

tape (False, list, None)

.

forced_varyon (False, bool, None)

.

vg_auto_import (False, bool, None)

.

fs (False, list, None)

.

disk (False, list, None)

.

fs_before_ipaddr (False, bool, None)

.

wpar (False, str, None)

.

export_nfs (False, list, None)

.

export_nfs4 (False, list, None)

.

stable_storage_path (False, str, None)

.

nfs_network (False, str, None)

.

mount_nfs (False, list, None)

.

mirror_group (False, str, None)

.

fallback_at (False, str, None)

.

state (False, str, present)

the desired state of the resource - present, absent, started, stopped, moved.

If the resource is already defined, it will not be changed.

Examples

# create a new resource group
- name: Create a new resource group
  enfence.powerha_aix.rg:
    name: rg_oracle
    nodes:
      - node1
      - node2
    startup: OHN
    fallover: FNPN
    fallback: NFB
    service: ['serviceip']
    application: ['ac_ora']
    volgrp:
      - vg01
      - vg02
      - vg03
    state: present

# bring resource group online
- name: Start resource group
  enfence.powerha_aix.rg:
    name: rg_oracle
    state: started

# bring resource group offline
- name: Stop resource group
  enfence.powerha_aix.rg:
    name: rg_oracle
    state: stopped

# delete an existing resource group
- name: Delete an existing resource group
  enfence.powerha_aix.rg:
    name: rg_oracle
    state: absent

# move resource group to another node
- name: Move resource group to another node
  enfence.powerha_aix.rg:
    name: rg_oracle
    target_node: node2
    state: moved

Return Values

changed (always, bool, )

set to true if the resource was changed

msg (always, str, )

error and informational messages

rc (always, int, )

return code of the last executed command

stdout (always, str, )

standard output of the last executed command

stderr (always, str, )

standard error of the last executed command

Status

Authors

  • Andrey Klyachkin (@aklyachkin)