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_login¤

This role provides support to login to a cluster using the oc CLI by looking up cluster information from the infrastructure provider's APIs, it also supports setting ocp_server and ocp_token directly to support login to any Kubernetes cluster.

Role Variables¤

cluster_name¤

The name of the cluster to login to. This will be used to lookup the actual login credentials of the system.

cluster_type¤

The type of cluster to login to (roks, fyre, or rosa)

ocp_server¤

The OCP server address to perform oc login against

ocp_token¤

The login token to use for oc login

Role Variables - IBMCloud ROKS¤

ibmcloud_apikey¤

APIKey to be used by ibmcloud login comand

ibmcloud_endpoint¤

Override the default IBMCloud API endpoint.

Role Variables - IBM DevIT Fyre¤

fyre_username¤

Your FYRE username

fyre_apikey¤

Your FYRE API Key - Required when cluster_type is fyre - Environment Variable: FYRE_APIKEY - Default: None

fyre_site¤

Site where cluster had been provisioned in Fyre

enable_ipv6¤

Enable IPv6. This is for Fyre at RTP site only - Environment Variable: ENABLE_IPV6 - Default: False

Role Variables - AWS ROSA¤

rosa_token¤

Your ROSA secure token.

rosa_cluster_admin_password¤

The password for the cluster-admin account (created when the cluster was provisioned).

Example Playbooks¤

Direct Login¤

- hosts: localhost
  vars:
    ocp_server: xxxxx
    ocp_token: xxxxx
  roles:
    - ibm.mas_devops.ocp_login

IBMCloud ROKS¤

- hosts: localhost
  vars:
    cluster_name: mycluster
    cluster_type: roks
    ibmcloud_apikey: xxxxx
    ibmcloud_resourcegroup: mygroup
  roles:
    - ibm.mas_devops.ocp_login

AWS ROSA¤

- hosts: localhost
  vars:
    cluster_name: mycluster
    cluster_type: rosa
    rosa_token: xxxxx
    rosa_cluster_admin_password: xxxxx
  roles:
    - ibm.mas_devops.ocp_login

IBM DevIT Fyre¤

- hosts: localhost
  vars:
    cluster_name: mycluster
    cluster_type: fyre
    fyre_username: xxxxx
    fyre_password: xxxxx
  roles:
    - ibm.mas_devops.ocp_login

License¤

EPL-2.0