MAS DevOps Ansible Collection Ansible CLI
Edit on GitHub
Home Ansible Automation Platform OCP Install Cloud Pak For Data Install Core Add AIBroker Add IoT Add Manage Add Monitor Add Optimizer Add Predict Add Visual Inspection Update Upgrade Uninstall Core Backup & Restore ocp_cluster_monitoring ocp_config ocp_deprovision ocp_efs ocp_github_oauth ocp_login ocp_node_config ocp_provision ocp_roks_upgrade_registry_storage ocp_upgrade ocp_verify appconnect aws_bucket_access_point aws_documentdb_user aws_policy aws_route53 aws_user_creation aws_vpc cert_manager cis common-services configure_manage_eventstreams cos cos_bucket cp4d_admin_pwd_update cp4d cp4d_service db2 dro eck grafana ibm_catalogs kafka nvidia_gpu mongodb ocs sls turbonomic uds mirror_case_prepare mirror_extras_prepare mirror_images mirror_ocp ocp_idms ocp_simulate_disconnected_network registry suite_app_config suite_app_install suite_app_uninstall suite_app_upgrade suite_app_rollback suite_app_backup_restore suite_certs suite_config suite_db2_setup_for_manage suite_dns suite_install suite_manage_attachments_config suite_manage_birt_report_config suite_manage_bim_config suite_manage_customer_files_config suite_manage_imagestitching_config suite_manage_import_certs_config suite_manage_load_dbc_scripts suite_manage_logging_config suite_manage_pvc_config suite_uninstall suite_upgrade suite_rollback suite_verify suite_backup_restore ansible_version_check entitlement_key_rotation gencfg_jdbc gencfg_watsonstudio gencfg_workspace gencfg_mongo

ocp_node_config¤

Use the following command to verify the effect of any labels and taints that you apply to a node:

oc get pods --all-namespaces -o wide --field-selector spec.nodeName=xxx

Role Variables - Node Selection¤

Use either ocp_node_name or ocp_node_index to identify the node to be modified. If you specify both then the index will take priority over the name, if you specify neither then the role will fail to execute.

ocp_node_name¤

The name of the node to work with

ocp_node_index¤

The index (in the list of nodes) of the node to work with. Note that the index starts at 0 (so use ocp_node_index=0 if you want to work with the first node).

Role Variables - Node Labels¤

ocp_node_label_keys¤

A comma-seperated list of labels to add to the selected node

ocp_node_label_values¤

A comma-seperated list of values for the labels being created

Role Variables - Node Taints¤

ocp_node_taint_keys¤

A comma-seperated list of taints to add to the selected node

ocp_node_taint_values¤

A comma-seperated list of values for the taints being created

ocp_node_taint_effects¤

A comma-seperated list of taint effects to set:

Example Playbook¤

- hosts: localhost
  any_errors_fatal: true
  vars:
    # Turn this worker node into a dedicated Db2 worker node
    ocp_node_name: "10.172.168.89"

    # Add the label that will be applied to all dedicated Db2 nodes
    # this will be used to direct Db2 workloads to these nodes
    ocp_node_label_keys: workload
    ocp_node_label_values: db2

    # Set a taint preventing anything other than Db2 workloads for masinst1 running
    # on this node specific Db2 node
    ocp_node_taint_keys: dedicatedDb2Node
    ocp_node_taint_values: masinst1
    ocp_node_taint_effects: NoExecute

  roles:
    - ibm.mas_devops.ocp_node_config

License¤

EPL-2.0