Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix indentation in examples @ README.md #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ In this simple example, a **Single Node OpenShift** is created inside **OpenShif

```yaml
- name: Add the service (type LoadBalancer) for SNO
kubernetes.core.k8s:
kubernetes.core.k8s:
definition: "{{ lookup('ansible.builtin.template', 'templates/sno_svc.yaml') }}"
wait: true
wait_timeout: 300
Expand All @@ -51,8 +51,8 @@ In this simple example, a **Single Node OpenShift** is created inside **OpenShif
namespace: "{{ ocp_namespace }}"

- name: Wait for the LoadBalancer value
register: sno_svc
kubernetes.core.k8s_info:
register: sno_svc
kubernetes.core.k8s_info:
api_version: v1
kind: Service
name: "{{ ocp_vmname_sno }}-svc"
Expand All @@ -62,19 +62,19 @@ In this simple example, a **Single Node OpenShift** is created inside **OpenShif
delay: 2

- name: Add CNAME dns record
amazon.aws.route53:
amazon.aws.route53:
state: present
zone: "{{ dns_zone }}"
record: "{{ item }}.{{ cluster_name}}.{{ cluster_domain }}"
type: CNAME
value: "{{ sno_svc.resources[0].status.loadBalancer.ingress[0].hostname }}"
ttl: 30
loop:
loop:
- "api"
- "*.apps"

- name: Create Assisted Installer Cluster
rhpds.assisted_installer.create_cluster:
rhpds.assisted_installer.create_cluster:
name: "{{ cluster_name }}"
openshift_version: "{{ cluster_version }}"
base_dns_domain: "{{ cluster_domain }}"
Expand All @@ -83,53 +83,53 @@ In this simple example, a **Single Node OpenShift** is created inside **OpenShif
high_availability_mode: "None"
service_networks:
- cidr: "172.31.0.0/16"
register: newcluster
register: newcluster

- name: Create Infrastructure environment
rhpds.assisted_installer.create_infra_env:
rhpds.assisted_installer.create_infra_env:
name: "{{ cluster_name }}-infra-env"
image_type: "{{ cluster_iso_type }}"
cluster_id: "{{ newcluster.result.id }}"
ssh_authorized_key: "{{ ssh_authorized_key }}"
offline_token: "{{ offline_token }}"
pull_secret: "{{ pull_secret }}"
register: newinfraenv
register: newinfraenv

- name: Create a SNO VM
kubernetes.core.k8s:
kubernetes.core.k8s:
definition: "{{ lookup('ansible.builtin.template', 'templates/sno.yaml') }}"
wait: true
wait_timeout: 300
wait_condition:
status: true
type: Ready
vars:
vars:
image_url: "{{ newinfraenv.result.download_url }}"
vmname: "{{ ocp_vmname_sno }}"
namespace: "{{ ocp_namespace }}"
storageclass: "gp3-csi"

- name: Wait for the hosts to be ready
rhpds.assisted_installer.wait_for_hosts:
rhpds.assisted_installer.wait_for_hosts:
cluster_id: "{{ newcluster.result.id }}"
offline_token: "{{ offline_token }}"
expected_hosts: 1
wait_timeout: 600

- name: Start cluster installation
rhpds.assisted_installer.install_cluster:
rhpds.assisted_installer.install_cluster:
cluster_id: "{{ newcluster.result.id }}"
offline_token: "{{ offline_token }}"
wait_timeout: 1200

- name: Obtain OpenShift cluster credentials
register: credentials
rhpds.assisted_installer.get_credentials:
register: credentials
rhpds.assisted_installer.get_credentials:
cluster_id: "{{ newcluster.result.id }}"
offline_token: "{{ offline_token }}"

- name: Display credentials
debug:
debug:
var: credentials.result
```

Expand Down