diff --git a/os-replace.sh b/os-replace.sh index 540f23c..9d3ff74 100755 --- a/os-replace.sh +++ b/os-replace.sh @@ -1,16 +1,6 @@ #!/bin/bash set -exuo pipefail -# Required env variables list -# PLATFORM: openstack, gcp, aws -# TEST_OS: rhel-9-4, centos-stream-9 -# ARCH: x86_64, aarch64 -# QUAY_USERNAME, QUAY_PASSWORD -# DOWNLOAD_NODE -# For RHEL only: RHEL_REGISTRY_URL, QUAY_SECRET -# For GCP only: GCP_SERVICE_ACCOUNT_FILE, GCP_SERVICE_ACCOUNT_NAME, GCP_PROJECT -# For AWS only: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION - # Colorful timestamped output. function greenprint { echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m" @@ -173,7 +163,7 @@ ansible-playbook -v \ playbooks/remove.yaml greenprint "Clean up" -rm -rf "$TEMPDIR" auth.json rhel-9-4.repo +rm -rf auth.json rhel-9-4.repo unset ANSIBLE_CONFIG greenprint "🎉 All tests passed." diff --git a/playbooks/check-system.yaml b/playbooks/check-system.yaml index 9bf005c..b2d7430 100644 --- a/playbooks/check-system.yaml +++ b/playbooks/check-system.yaml @@ -187,7 +187,7 @@ block: - assert: that: - - result_usr_mount_point.stdout == usr_mount_path + - result_usr_mount_point.stdout == usr_mount_path or result_usr_mount_point.stdout == "overlay[/usr]" fail_msg: "/usr does not mount on {{ usr_mount_path }}" success_msg: "/usr mounts on {{ usr_mount_path }}" always: diff --git a/playbooks/deploy-aws.yaml b/playbooks/deploy-aws.yaml index ba56cdb..1d37749 100644 --- a/playbooks/deploy-aws.yaml +++ b/playbooks/deploy-aws.yaml @@ -19,8 +19,11 @@ x86_64: "0": t2.medium "1": t3.medium - "2": t3a.medium - "3": m4.large + "2": m6a.large + aarch64: + "0": t4g.medium + "1": c7g.medium + "2": m6g.medium tasks: - set_fact: @@ -36,15 +39,15 @@ set_fact: random_instance_type: "{{ lookup('env', 'instance_type') | default(instance_type[arch][instance_type_index], true) }}" - - name: get all availability zones - amazon.aws.aws_az_info: - register: ec2_zones + - name: "get available zone for instance {{ random_instance_type }}" + shell: aws ec2 describe-instance-type-offerings --location-type availability-zone --filters="Name=instance-type,Values={{ random_instance_type }}" --query InstanceTypeOfferings | jq -r '.[0].Location' + register: ec2_zone - name: get subnet amazon.aws.ec2_vpc_subnet_info: filters: "tag:Name": "kite-ci" - "availabilityZone": "{{ ec2_zones.availability_zones[0].zone_name }}" + "availabilityZone": "{{ ec2_zone.stdout }}" register: ec2_vpc_subnet - name: get security group diff --git a/playbooks/install.yaml b/playbooks/install.yaml index b3c0132..0e7047e 100644 --- a/playbooks/install.yaml +++ b/playbooks/install.yaml @@ -5,6 +5,24 @@ test_image_url: "" tasks: + - name: check bios or uefi + stat: + path: /sys/firmware/efi + + - name: check partition size + command: df -Th + ignore_errors: true + become: true + + - name: check disk partition table + command: fdisk -l + ignore_errors: true + become: true + + - name: check mount table + command: findmnt + ignore_errors: true + - name: Install podman and skopeo package: name: