IBM power_ibmi collection

Getting Started

  • Installing IBM i collection to Ansible server
  • Running Ansible to manage IBM i systems

Reference

  • Plugins
  • Modules
    • Module reference
      • ibmi_at – Schedule a batch job
      • ibmi_cl_command – Executes a CL(Control language) command
      • ibmi_copy – Copy a save file from local to a remote IBM i node
      • ibmi_device_vary – Vary on or off target device
      • ibmi_display_fix – Displays the PTF(Program Temporary Fix) information and also get the requisite PTFs information of the PTF
      • ibmi_display_subsystem – Displays all currently active subsystems or currently active jobs in a subsystem
      • ibmi_download_fix – Download fix through SNDPTFORD
      • ibmi_download_fix_status – Checking whether the fix downloading complete
      • ibmi_end_subsystem – End an active subsystem.
      • ibmi_ethernet_port – Retrieves all the ethernet ports(both virtual and physical)information on the system.
      • ibmi_facts – Gathering ibmi facts
      • ibmi_fetch – Fetch objects or a library from a remote IBM i node and store on local
      • ibmi_fix – Install, remove or query an individual fix or a set of fixes on to IBM i system.
      • ibmi_fix_check – Retrieve the latest PTF group information from PSP server.
      • ibmi_fix_compare – Verify whether the PTFs are installed.
      • ibmi_fix_group_check – Retrieve the latest PTF group information from PSP server.
      • ibmi_fix_imgclg – Install fixes such as PTF, PTF Group, Technology refresh to the target IBM i system by image catalog.
      • ibmi_fix_network_install_client – Install PTFs on the client via IBM i Network install
      • ibmi_fix_network_install_server – Setup IBM i Network install server which contains image files of PTFs, PTF Group and Technology refresh.
      • ibmi_fix_product_check – Check the software product installation status for a fix
      • ibmi_fix_repo – Manipulate the PTF database via sqlite3
      • ibmi_fix_repo_lv1 – Manipulate the PTF database via sqlite3
      • ibmi_get_nonconfigure_disks – Get all un-configure disks
      • ibmi_host_server_service – Manage host server
      • ibmi_iasp – Control IASP
      • ibmi_install_product_from_savf – Install the licensed program(product) from a save file.
      • ibmi_job – Returns job information according to inputs.
      • ibmi_lib_restore – Restore one library
      • ibmi_lib_save – Save one libary
      • ibmi_message – Search message
      • ibmi_mirror_setup_copy – Configures the Db2 Mirror on the target node.
      • ibmi_mirror_setup_source – Configures the Db2 Mirror on the source node
      • ibmi_mirror_warm_clone_activity – Performs suspend and resume activity for warm clone.
      • ibmi_module_authority_check – Check the authority of executing a module.
      • ibmi_module_config – Configures managed nodes settings
      • ibmi_nrg_link – Manages NRGs(Network Redundancy Groups) links
        • Synopsis
        • Parameters
        • Examples
        • Notes
        • See Also
        • Return Values
      • ibmi_object_authority – Grant, revoke or display object authority
      • ibmi_object_find – Find specific IBM i object(s).
      • ibmi_object_restore – Restore one or more objects
      • ibmi_object_save – Save one or more objects
      • ibmi_query_job_log – Query the specific job log.
      • ibmi_reboot – Reboot an IBM i machine
      • ibmi_reply_message – Send a reply message to the sender of an inquiry message
      • ibmi_rtv_command – Executes a command which is valid only within a CL program or REXX procedure
      • ibmi_save_product_to_savf – Save the the licensed program(product) to a save file
      • ibmi_script – Execute a local cl/sql script file.
      • ibmi_script_execute – Execute a cl/sql script file
      • ibmi_spooled_file_data – Returns the content of a spooled file.
      • ibmi_sql_execute – Executes a SQL non-DQL(Data Query Language) statement
      • ibmi_sql_query – Executes a SQL DQL(Data Query Language) statement.
      • ibmi_sqlite3 – Executes a SQL statement via sqlite3
      • ibmi_start_subsystem – Start an inactive subsystem
      • ibmi_submit_job – Submit a job on IBM i system. This module functions like SBMJOB.
      • ibmi_sync – Synchronize a save file from current IBM i node A to another IBM i node B.
      • ibmi_sync_files – Synchronize a list of files from current IBM i node A to another IBM i node B.
      • ibmi_synchronize – Synchronize a save file from IBM i node A to another IBM i node B
      • ibmi_synchronize_files – Synchronize a list of files from IBM i node A to another IBM i node B
      • ibmi_sysval – Displays the specified system value
      • ibmi_tcp_interface – Add, change, remove or query a tcp/ip interface.
      • ibmi_tcp_server_service – Manage tcp server
      • ibmi_uninstall_product – Delete the objects that make up the licensed program(product)
      • ibmi_user_and_group – Create, change or display a user(or group) profile
      • ibmi_user_compliance_check – Check if the value of a field of user profile is expected
IBM power_ibmi collection
  • »
  • Modules »
  • ibmi_nrg_link – Manages NRGs(Network Redundancy Groups) links
  • Edit on GitHub

ibmi_nrg_link – Manages NRGs(Network Redundancy Groups) links¶

  • Synopsis

  • Parameters

  • Examples

  • Notes

  • See Also

  • Return Values

Synopsis¶

  • The ibmi_nrg_link module adds or removes a link to one or all of the Db2 Mirror Network Redundancy Groups (NRGs).

Parameters¶

become_user

The name of the user profile that the IBM i task will run under.

Use this option to set a user with desired privileges to run the task.

required: false
type: str
become_user_password

Use this option to set the password of the user specified in become_user.

required: false
type: str
change_load_balance_link_count

Indicates whether to increment the load balance link count when add a new link to the NRG or decrement the load balance link count when remove a link from the NRG.

required: false
type: bool
default: True
line_description

A string that contains the local system line description associated with this link. This parameter is required when source-address is an IPv6 link-local address and is used to identify a unique local interface. It is ignored for all other addresses.

required: false
type: str
link_priority

A string that contains an integer value set as the priority of the link. The range of priorities is from 1 to 16, where 1 is the highest priority. Priority values do not need to be unique.

Required when the operation is add

Ignored when the operation is remove

required: false
type: str
nrg_name

A string that contains the name of the NRG where the link is to be added. If the NRG does not exist, it will be created.

required: false
type: str
default: *MIRROR
choices: *MIRROR, MIRROR_DATABASE, MIRROR_ENGINE, MIRROR_IFS, MIRROR_OTHER, MIRROR_RESYNC
operation

NRGs link operation.

required: True
type: str
choices: add, remove
source_address

A string that contains the local IP address for the link to add. Either an IPv4 or an IPv6 address can be specified.

When the operation is remove, it can also contain the following special value *ALL to remove all links for this NRG.

required: True
type: str
target_address

A string that contains the remote IP address for the link to add. Either an IPv4 or an IPv6 address can be specified.

Required when the operation is add

Ignored when the operation is remove

required: false
type: str
virtual_lan_id

A string that contains an integer value for the local virtual LAN identifier associated with this link. This parameter is required when source-address is an IPv6 link-local address and is used to identify a unique local interface. It is ignored for all other addresses.

required: false
type: str

Examples¶

- name: add a link to the db2 mirror nrg
  ibm.power_ibmi.ibmi_nrg_link:
    operation: add
    source_address: 10.0.0.1
    target_address: 10.0.0.2
    link_priority: 1

- name: remove a link from the db2 mirror nrg with become user
  ibm.power_ibmi.ibmi_nrg_link:
    operation: remove
    source_address: 10.0.0.1
    become_user: 'USER1'
    become_user_password: 'yourpassword'

Notes¶

Note

This module supports IBMi 7.4 and above release, and 5770SS1 option 48 is required.

NRG_INFO and NRG_LINK_INFO view can be used to retrieve the NRG and NRG links information by using module ibmi_sql_query.

More information about NRG related services refer to https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/db2mi/db2mservicesnrg.htm

See Also¶

See also

  • ibmi_sql_query – Executes a SQL DQL(Data Query Language) statement.

Return Values¶

msg
The message that describes the error or success
returned: always
type: str
sample: Error occurred when retrieving the mirror state
job_log
the job_log
returned: always
type: str
sample: [{‘FROM_INSTRUCTION’: ‘318F’, ‘FROM_LIBRARY’: ‘QSYS’, ‘FROM_MODULE’: ‘’, ‘FROM_PROCEDURE’: ‘’, ‘FROM_PROGRAM’: ‘QWTCHGJB’, ‘FROM_USER’: ‘CHANGLE’, ‘MESSAGE_FILE’: ‘QCPFMSG’, ‘MESSAGE_ID’: ‘CPD0912’, ‘MESSAGE_LIBRARY’: ‘QSYS’, ‘MESSAGE_SECOND_LEVEL_TEXT’: ‘Cause … . . : This message is used by application programs as a general escape message.’, ‘MESSAGE_SUBTYPE’: ‘’, ‘MESSAGE_TEXT’: ‘Printer device PRT01 not found.’, ‘MESSAGE_TIMESTAMP’: ‘2020-05-20-21.41.40.845897’, ‘MESSAGE_TYPE’: ‘DIAGNOSTIC’, ‘ORDINAL_POSITION’: ‘5’, ‘SEVERITY’: ‘20’, ‘TO_INSTRUCTION’: ‘9369’, ‘TO_LIBRARY’: ‘QSYS’, ‘TO_MODULE’: ‘QSQSRVR’, ‘TO_PROCEDURE’: ‘QSQSRVR’, ‘TO_PROGRAM’: ‘QSQSRVR’}]
rc
The return code (0 means success, non-zero means failure)
returned: always
type: int
Next Previous

© Copyright 2020, IBM.