diff --git a/molecule/agent-smoke-kmodule/molecule.yml.template b/molecule/agent-smoke-kmodule/molecule.yml.template index d2b69a979..47d8efc8f 100644 --- a/molecule/agent-smoke-kmodule/molecule.yml.template +++ b/molecule/agent-smoke-kmodule/molecule.yml.template @@ -13,23 +13,11 @@ platforms: instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: alma-9-x86_64 image: ami-07bc349330a94a4e3 instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: debian-10-x86_64 image: ami-0e1e938b3f38e7558 instance_type: ${INSTANCE_TYPE_X86} @@ -81,40 +69,28 @@ platforms: instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - # - name: centos8-x86 - # boot_wait_seconds: 180 - # image: ami-03dbb661dc3a9b6a5 - # instance_type: ${INSTANCE_TYPE_X86} - # region: ${REGION} - # vpc_subnet_id: ${VPC_SUBNET_ID} - # - name: centos8-aarch - # boot_wait_seconds: 180 - # image: ami-0fbdd12bd5a9c2e6f - # instance_type: ${INSTANCE_TYPE_AARCH} - # region: ${REGION} - # vpc_subnet_id: ${VPC_SUBNET_ID} - - name: rocky8 + - name: centos8-x86_64 + boot_wait_seconds: 180 + image: ami-0aa6883376595a33c + instance_type: ${INSTANCE_TYPE_X86} + region: ${REGION} + vpc_subnet_id: ${VPC_SUBNET_ID} + - name: centos8-arm64 + boot_wait_seconds: 180 + image: ami-02be6a70c24b1ae91 + instance_type: ${INSTANCE_TYPE_AARCH} + region: ${REGION} + vpc_subnet_id: ${VPC_SUBNET_ID} + - name: rocky8-x86_64 image: ami-093bfdaaa5ea85b41 instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: rocky-9-x86_64 image: ami-021a1f96fec61f4e9 instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: centos-7-x86_64 image: ami-0aedf6b1cb669b4c7 instance_type: ${INSTANCE_TYPE_X86} diff --git a/molecule/agent-smoke-legacy-ebpf/molecule.yml.template b/molecule/agent-smoke-legacy-ebpf/molecule.yml.template index 91cece8d2..471c66e23 100644 --- a/molecule/agent-smoke-legacy-ebpf/molecule.yml.template +++ b/molecule/agent-smoke-legacy-ebpf/molecule.yml.template @@ -13,23 +13,11 @@ platforms: instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: alma-9-x86_64 image: ami-07bc349330a94a4e3 instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: debian-10-x86_64 image: ami-0e1e938b3f38e7558 instance_type: ${INSTANCE_TYPE_X86} @@ -60,7 +48,7 @@ platforms: instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - - name: ubuntu-2204-amd64 + - name: ubuntu-2204-arm64 image: ami-01ec7354bd709968b instance_type: ${INSTANCE_TYPE_AARCH} region: ${REGION} @@ -81,40 +69,28 @@ platforms: instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - # - name: centos8-x86 - # boot_wait_seconds: 180 - # image: ami-03dbb661dc3a9b6a5 - # instance_type: ${INSTANCE_TYPE_X86} - # region: ${REGION} - # vpc_subnet_id: ${VPC_SUBNET_ID} - # - name: centos8-aarch - # boot_wait_seconds: 180 - # image: ami-0fbdd12bd5a9c2e6f - # instance_type: ${INSTANCE_TYPE_AARCH} - # region: ${REGION} - # vpc_subnet_id: ${VPC_SUBNET_ID} - - name: rocky8 + - name: centos8-x86_64 + boot_wait_seconds: 180 + image: ami-0aa6883376595a33c + instance_type: ${INSTANCE_TYPE_X86} + region: ${REGION} + vpc_subnet_id: ${VPC_SUBNET_ID} + - name: centos8-arm64 + boot_wait_seconds: 180 + image: ami-02be6a70c24b1ae91 + instance_type: ${INSTANCE_TYPE_AARCH} + region: ${REGION} + vpc_subnet_id: ${VPC_SUBNET_ID} + - name: rocky8-x86_64 image: ami-093bfdaaa5ea85b41 instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: rocky-9-x86_64 image: ami-021a1f96fec61f4e9 instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 provisioner: lint: name: ansible-lint diff --git a/molecule/agent-smoke-universal-ebpf/molecule.yml.template b/molecule/agent-smoke-universal-ebpf/molecule.yml.template index 91350beb1..e151c9d94 100644 --- a/molecule/agent-smoke-universal-ebpf/molecule.yml.template +++ b/molecule/agent-smoke-universal-ebpf/molecule.yml.template @@ -13,23 +13,11 @@ platforms: instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: alma-9-x86_64 image: ami-07bc349330a94a4e3 instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: debian-11-x86_64 image: ami-0fd320e6b2de9e34a instance_type: ${INSTANCE_TYPE_X86} @@ -65,12 +53,6 @@ platforms: instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 provisioner: lint: name: ansible-lint diff --git a/molecule/agent-uninstall-clean-all/molecule.yml.template b/molecule/agent-uninstall-clean-all/molecule.yml.template index aec735427..d7eff330c 100644 --- a/molecule/agent-uninstall-clean-all/molecule.yml.template +++ b/molecule/agent-uninstall-clean-all/molecule.yml.template @@ -13,23 +13,11 @@ platforms: instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: alma-9-x86_64 image: ami-07bc349330a94a4e3 instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: debian-10-x86_64 image: ami-0e1e938b3f38e7558 instance_type: ${INSTANCE_TYPE_X86} @@ -81,40 +69,28 @@ platforms: instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - # - name: centos8-x86 - # boot_wait_seconds: 180 - # image: ami-03dbb661dc3a9b6a5 - # instance_type: ${INSTANCE_TYPE_X86} - # region: ${REGION} - # vpc_subnet_id: ${VPC_SUBNET_ID} - # - name: centos8-aarch - # boot_wait_seconds: 180 - # image: ami-0fbdd12bd5a9c2e6f - # instance_type: ${INSTANCE_TYPE_AARCH} - # region: ${REGION} - # vpc_subnet_id: ${VPC_SUBNET_ID} + - name: centos8-x86 + boot_wait_seconds: 180 + image: ami-03dbb661dc3a9b6a5 + instance_type: ${INSTANCE_TYPE_X86} + region: ${REGION} + vpc_subnet_id: ${VPC_SUBNET_ID} + - name: centos8-aarch + boot_wait_seconds: 180 + image: ami-0fbdd12bd5a9c2e6f + instance_type: ${INSTANCE_TYPE_AARCH} + region: ${REGION} + vpc_subnet_id: ${VPC_SUBNET_ID} - name: rocky8 image: ami-093bfdaaa5ea85b41 instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: rocky-9-x86_64 image: ami-021a1f96fec61f4e9 instance_type: ${INSTANCE_TYPE_X86} region: ${REGION} vpc_subnet_id: ${VPC_SUBNET_ID} - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 30 - delete_on_termination: true - volume_type: gp3 - name: centos-7-x86_64 image: ami-0aedf6b1cb669b4c7 instance_type: ${INSTANCE_TYPE_X86} diff --git a/molecule/resources/playbooks/create.yml b/molecule/resources/playbooks/create.yml index 5f72a8a62..7d2d09043 100644 --- a/molecule/resources/playbooks/create.yml +++ b/molecule/resources/playbooks/create.yml @@ -20,7 +20,7 @@ # Platform settings handling default_assign_public_ip: true default_aws_profile: "{{ lookup('env', 'AWS_PROFILE') }}" - default_boot_wait_seconds: 120 + default_boot_wait_seconds: 180 default_instance_type: t3a.medium default_key_inject_method: cloud-init # valid values: [cloud-init, ec2] default_key_name: "molecule-{{ run_config.run_id }}" @@ -70,7 +70,12 @@ region: "" security_groups: [] tags: {} - volumes: [] + volumes: + - device_name: /dev/sda1 + ebs: + volume_size: 30 + delete_on_termination: true + volume_type: gp3 vpc_id: "" vpc_subnet_id: "" diff --git a/molecule/resources/playbooks/prepare.yml b/molecule/resources/playbooks/prepare.yml index f1dea7a5c..b8c65d2e2 100644 --- a/molecule/resources/playbooks/prepare.yml +++ b/molecule/resources/playbooks/prepare.yml @@ -29,22 +29,24 @@ when: update_debian_kernel.changed when: ansible_distribution == "Debian" - # See https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/ - - name: Import AlmaLinux 8 GPG key - ansible.builtin.rpm_key: - state: present - key: https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux - when: - - ansible_distribution == 'AlmaLinux' - - ansible_distribution_major_version == '8' + - name: Prepare Alma, Fedora, and Rocky hosts + block: + # See https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/ + - name: Import AlmaLinux 8 GPG key + ansible.builtin.rpm_key: + state: present + key: https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux + when: + - ansible_distribution == 'AlmaLinux' + - ansible_distribution_major_version == '8' - - name: Update Alma, Fedora, and Rocky kernels - ansible.builtin.dnf: - name: kernel - state: latest - register: update_kernel - when: ansible_distribution in ['AlmaLinux', 'Fedora', 'Rocky'] + - name: Update kernels + ansible.builtin.dnf: + name: kernel + state: latest + register: update_kernel - - name: Reboot systems after kernel update (if required) - ansible.builtin.reboot: - when: update_kernel.changed + - name: Reboot systems after kernel update (if required) + ansible.builtin.reboot: + when: update_kernel.changed + when: ansible_distribution in ['AlmaLinux', 'Fedora', 'Rocky']