phoenixnap.bmc.cluster_info (1.17.0) — module

Gather information about phoenixNAP clusters

| "added in version" 1.1.0 of phoenixnap.bmc"

Authors: Pavle Jojkic (@pajuga) <pavlej@phoenixnap.com>, Goran Jelenic (@goranje) <goranje@phoenixnap.com>

preview | supported by certified

Install collection

Install with ansible-galaxy collection install phoenixnap.bmc:==1.17.0


Add to requirements.yml

  collections:
    - name: phoenixnap.bmc
      version: 1.17.0

Description

Retrieves all clusters associated with the authenticated account.

This module has a dependency on requests

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# All the examples assume that you have file config.yaml with your 'clientId' and 'clientSecret'
# in location: ~/.pnap/config.yaml

- name: List clusters
  hosts: localhost
  gather_facts: false
  vars_files:
    - ~/.pnap/config.yaml
  tasks:
    - name: List clusters
      phoenixnap.bmc.cluster_info:
        client_id: "{{ clientId }}"
        client_secret: "{{ clientSecret }}"
      register: output
    - name: Print the gathered infos
      ansible.builtin.debug:
        var: output.clusters

Inputs

    
client_id:
    description: Client ID (Application Management)
    type: str

client_secret:
    description: Client Secret (Application Management)
    type: str

Outputs

clusters:
  contains:
    configuration:
      contains:
        certificates:
          contains:
            caCertificate:
              description: The SSL CA certificate to be used for rancher admin.
              type: str
            certificate:
              description: The SSL certificate to be used for rancher admin.
              type: str
            certificateKey:
              description: The SSL certificate key to be used for rancher admin.
              type: str
          description: Define the custom SSL certificates to be used instead of defaults.
          returned: always
          type: complex
        clusterDomain:
          description: This maps to ranchers cluster-domain. Cluster Domain.
          sample: cluster.local
          type: str
        etcdSnapshotScheduleCron:
          description: This maps to ranchers etcd-snapshot-retention. Number of snapshots
            to retain.
          sample: 5
          type: int
        nodeTaint:
          description: This maps to ranchers node-taint. Registering kubelet with
            set of taints.
          sample: CriticalAddonsOnly=true:NoExecute
          type: str
        tlsSan:
          description: This maps to ranchers tls-san. Add additional hostname or IP
            as a Subject Alternative Name in the TLS cert.
          sample: mydomain.com
          type: str
        token:
          description: Shared secret used to join a server or agent to a cluster.
          sample: gS7SnDnY5st0ryJxMXA7
          type: str
      description: Rancher configuration parameters.
      returned: always
      type: list
    description:
      description: My first Rancher Server Cluster.
      returned: always
      sample: Cluster description.
      type: str
    id:
      description: The Cluster identifier.
      returned: always
      sample: 6047127fed34ecc3ba8402d2
      type: str
    initialClusterVersion:
      description: The Rancher version that was installed on the cluster during the
        first creation process.
      returned: always
      sample: v2.5.9
      type: str
    location:
      description: Deployment location.
      returned: always
      sample: PHX
      type: str
    metadata:
      contains:
        password:
          description:
          - This is the password to be used to login to the Rancher Server.
          - This field is returned only as a response to the create cluster request.
          - Make sure to take note or you will not be able to access the server.
          sample: 1234567890abcd!
          type: str
        url:
          description: The Rancher Server URL.
          sample: https://rancher/
          type: str
        username:
          description:
          - The username to use to login to the Rancher Server.
          - This field is returned only as a response to the create cluster request.
          - Make sure to take note or you will not be able to access the server.
          sample: admin
          type: str
      description: Connection parameters to use to connect to the Rancher Server Administrative
        GUI.
      returned: always
      type: complex
    name:
      description: Cluster name. This field is autogenerated if not provided.
      returned: always
      sample: Rancher Management Cluster
      type: str
    nodePools:
      contains:
        name:
          description: The name of the node pool.
          sample: Rancher Server node pool.
          type: str
        nodeCount:
          description: The client ID of the application
          sample: 1
          type: int
        nodes:
          contains:
            serverId:
              description: The server identifier.
              sample: 60b08f04adab617be44068bb
              type: str
          description: The nodes associated with this node pool.
          type: list
        serverType:
          description: Node server type.
          sample: s0.d1.small
          type: str
        sshConfig:
          contains:
            installDefaultKeys:
              description:
              - Define whether public keys marked as default should be installed on
                this node.
              - These are public keys that were already recorded on this system.
              - Use GET /ssh-keys to retrieve a list of possible values.
              sample: true
              type: bool
            keyIds:
              description: List of public SSH key identifiers. These are public keys
                that were already recorded on this system.
              elements: str
              type: list
            keys:
              description: List of public SSH keys.
              elements: str
              type: list
          description:
          - Configuration defining which public SSH keys are pre-installed as authorized
            on the server.
          - Any manual configuration done on the server after installation is not
            reflected by this configuration.
          type: dict
      description: The node pools associated with the cluster.
      returned: always
      type: list
    statusDescription:
      description: The cluster status
      sample: Creating
      type: str
    workloadConfiguration:
      contains:
        location:
          description: Workload cluster location. Cannot be changed once cluster is
            created.
          sample: PHX
          type: str
        name:
          description: The name of the workload cluster. This field is autogenerated
            if not provided.
          sample: Workload CLuster
          type: str
        serverCount:
          description: Number of configured servers. Default value is 1
          sample: 1
          type: int
        server_Type:
          description: Node server type. Cannot be changed once the cluster is created.
            Default value is s0.d1.small
          sample: s0.d1.small
          type: str
      description: Workload cluster configuration parameters.
      type: complex
  description: The clusters information as list
  returned: success
  type: complex