agonzalezrh.install_openshift.create_cluster (1.0.4) — module

Creates a new OpenShift cluster definition.

| "added in version" 1.0.0 of agonzalezrh.install_openshift"

Authors: Alberto Gonzalez (@agonzalezrh)

Install collection

Install with ansible-galaxy collection install agonzalezrh.install_openshift:==1.0.4


Add to requirements.yml

  collections:
    - name: agonzalezrh.install_openshift
      version: 1.0.4

Description

Creates a new OpenShift cluster definition using Assisted Installer

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a new SNO Assisted Installer Cluster
  agonzalezrh.install_openshift.create_cluster:
    name: "{{ cluster_name }}"
    high_availability_mode: "None"
    openshift_version: "{{ cluster_version }}"
    base_dns_domain: "{{ cluster_domain }}"
    offline_token: "{{ offline_token }}"
    pull_secret: "{{ pull_secret }}"
    service_networks:
      - cidr: "172.31.0.0/16"
  register: newcluster

Inputs

    
name:
    description: Name of the cluster
    required: true
    type: str

tags:
    description: A comma-separated list of tags that are associated to the cluster.
    required: false
    type: str

api_vip:
    description: The virtual IP used to reach the OpenShift cluster's API.
    required: false
    type: str

api_vips:
    description: The virtual IPs used to reach the OpenShift cluster's API. Enter one
      IP address for single-stack clusters, or up to two for dual-stack clusters (at most
      one IP address per IP stack used). The order of stacks should be the same as order
      of subnets in Cluster Networks, Service Networks, and Machine Networks.
    required: false
    type: list

no_proxy:
    description: An "*" or a comma-separated list of destination domain names, domains,
      IP addresses, or other network CIDRs to exclude from proxying.
    required: false
    type: str

platform:
    description: The configuration for the specific platform upon which to perform the
      installation.
    required: false
    type: dict

http_proxy:
    description: A proxy URL to use for creating HTTP connections outside the cluster.  http://<username>:<pswd>@<ip>:<port>
    required: false
    type: str

https_proxy:
    description: A proxy URL to use for creating HTTPS connections outside the cluster.  http://<username>:<pswd>@<ip>:<port>
    required: false
    type: str

ingress_vip:
    description: The virtual IP used for cluster ingress traffic.
    required: false
    type: str

pull_secret:
    description: Pull secret to be used for OpenShift
    required: true
    type: str

ingress_vips:
    description: The virtual IPs used for cluster ingress traffic. Enter one IP address
      for single-stack clusters, or up to two for dual-stack clusters (at most one IP
      address per IP stack used). The order of stacks should be the same as order of subnets
      in Cluster Networks, Service Networks, and Machine Networks.
    required: false
    type: list

network_type:
    description: The desired network type used.
    required: false
    type: str

offline_token:
    description: Offline token from console.redhat.com
    required: true
    type: str

olm_operators:
    description: Defines the operators to be installed
    required: false
    type: list

hyperthreading:
    description: Enable/disable hyperthreading on master nodes, worker nodes, or all nodes.
    required: false
    type: str

ssh_public_key:
    description: SSH public key for debugging OpenShift nodes.
    required: false
    type: str

base_dns_domain:
    description: Base domain of the cluster. All DNS records must be sub-domains of this
      base and include the cluster name.
    required: true
    type: str

disk_encryption:
    description: Enable/disable disk encryption
    required: false
    type: dict

cluster_networks:
    description: Cluster networks that are associated with this cluster.
    required: false
    type: list

cpu_architecture:
    description: The CPU architecture of the image (x86_64/arm64/etc).
    required: false
    type: str

machine_networks:
    description: Machine networks that are associated with this cluster.
    required: false
    type: list

service_networks:
    description: Defines the service networks range
    required: false
    type: list

ignition_endpoint:
    description: Explicit ignition endpoint overrides the default ignition endpoint.
    required: false
    type: dict

ocp_release_image:
    description: OpenShift release image URI.
    required: false
    type: str

openshift_version:
    description: OpenShift version to be installed
    required: true
    type: str

schedulable_masters:
    description: Schedule workloads on masters
    required: false
    type: bool

vip_dhcp_allocation:
    description: Indicate if virtual IP DHCP allocation mode is enabled.
    required: false
    type: bool

cluster_network_cidr:
    description: IP address block from which Pod IPs are allocated. This block must not
      overlap with existing physical networks. These IP addresses are used for the Pod
      network, and if you need to access the Pods from an external network, configure
      load balancers and routers to manage the traffic.
    required: false
    type: str

service_network_cidr:
    description: The IP address pool to use for service IP addresses. You can enter only
      one IP address pool. If you need to access the services from an external network,
      configure load balancers and routers to manage the traffic.
    required: false
    type: str

additional_ntp_source:
    description: A comma-separated list of NTP sources (name or IP) going to be added
      to all the hosts.
    required: false
    type: str

high_availability_mode:
    description: Guaranteed availability of the installed cluster. 'Full' installs a Highly-Available
      cluster over multiple master nodes whereas 'None' installs a full cluster over one
      node.
    required: false
    type: str

cluster_network_host_prefix:
    description: The subnet prefix length to assign to each individual node. For example,
      if clusterNetworkHostPrefix is set to 23, then each node is assigned a /23 subnet
      out of the given cidr (clusterNetworkCIDR), which allows for 510 (2^(32 - 23) -
      2) pod IPs addresses. If you are required to provide access to nodes from an external
      network, configure load balancers and routers to manage the traffic
    required: false
    type: int

Outputs

result:
  description: Result from the API call
  returned: always
  type: dict