File tree 10 files changed +89
-2
lines changed
tests/molecule/os-ubuntu-noble
10 files changed +89
-2
lines changed Original file line number Diff line number Diff line change @@ -130,3 +130,4 @@ dmypy.json
130
130
src /molecule_plugins /_version.py
131
131
132
132
.vscode /
133
+ .idea /
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ test-network: test-network-shared test-network-user ## Test network
26
26
test-os-debian : test-os-debian-bullseye test-os-debian-bookworm # # Test Debian OS
27
27
28
28
.PHONY : test-os-ubuntu
29
- test-os-ubuntu : test-os-ubuntu-focal test-os-ubuntu-jammy # # Test Ubuntu OS
29
+ test-os-ubuntu : test-os-ubuntu-focal test-os-ubuntu-jammy test-os-ubuntu-noble # # Test Ubuntu OS
30
30
31
31
.PHONY : test-os
32
32
test-os : test-os-debian test-os-ubuntu # # Test OS
Original file line number Diff line number Diff line change 438
438
content : " {{ instance_conf | to_json | from_json | to_yaml }}"
439
439
dest : " {{ molecule_instance_config }}"
440
440
mode : " 0644"
441
+
442
+ # ## wait for cloud-init to complete #######################################
443
+ - name : Add hosts to in-memory inventory for follow-up tasks
444
+ ansible.builtin.add_host :
445
+ name : " {{ item.name }}"
446
+ ansible_user : " root"
447
+ ansible_become : yes
448
+ ansible_ssh_host : " {{ molecule_instances_ipv4[item.name] }}"
449
+ ansible_ssh_port : " {{ item.network_ssh_port }}"
450
+ ansible_ssh_host_key_checking : no
451
+ ansible_ssh_private_key_file : " {{ ssh_keypair.filename }}"
452
+ loop : " {{ molecule_instances }}"
453
+ loop_control :
454
+ label : " {{ item.name }}"
455
+
456
+ - name : Wait for Cloud-init to complete
457
+ ansible.builtin.command : " cloud-init status --wait"
458
+ register : cloud_init_status
459
+ changed_when : false
460
+ delegate_to : " {{ item.name }}"
461
+ loop : " {{ molecule_instances }}"
Original file line number Diff line number Diff line change 16
16
- wheel
17
17
{% - endif +%}
18
18
shell: /bin/bash
19
- sudo: [ "ALL=(ALL) NOPASSWD:ALL"]
19
+ sudo: "ALL=(ALL) NOPASSWD:ALL"
20
20
lock_passwd: true
21
21
ssh_authorized_keys:
22
22
- {{ ssh_keypair.public_key }}
Original file line number Diff line number Diff line change
1
+ ---
2
+ collections :
3
+ - name : community.crypto
4
+ version : " >=2.11.1"
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Converge
3
+ hosts : all
4
+
5
+ environment :
6
+ http_proxy : " {{ lookup('ansible.builtin.env', 'http_proxy') | default(omit) }}"
7
+ https_proxy : " {{ lookup('ansible.builtin.env', 'https_proxy') | default(omit) }}"
8
+
9
+ tasks :
10
+ - name : " Include tests"
11
+ ansible.builtin.include_role :
12
+ name : " tests"
Original file line number Diff line number Diff line change
1
+ ---
2
+ dependency :
3
+ name : galaxy
4
+ driver :
5
+ name : molecule-qemu
6
+ platforms :
7
+ - name : ubuntu-noble-amd64
8
+ image_url : https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img
9
+ image_checksum : sha256:https://cloud-images.ubuntu.com/noble/current/SHA256SUMS
10
+ network_ssh_port : 2222
11
+ - name : ubuntu-noble-arm64
12
+ image_arch : aarch64
13
+ image_url : https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-arm64.img
14
+ image_checksum : sha256:https://cloud-images.ubuntu.com/noble/current/SHA256SUMS
15
+ network_ssh_port : 2223
16
+ provisioner :
17
+ name : ansible
18
+ verifier :
19
+ name : ansible
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Prepare
3
+ hosts : all
4
+ become : true
5
+ gather_facts : false
6
+
7
+ environment :
8
+ http_proxy : " {{ lookup('ansible.builtin.env', 'http_proxy') | default(omit) }}"
9
+ https_proxy : " {{ lookup('ansible.builtin.env', 'https_proxy') | default(omit) }}"
10
+
11
+ tasks :
12
+ - name : Wait for SSH to become available
13
+ ansible.builtin.wait_for_connection :
14
+ delay : 5
15
+ timeout : 300
16
+
17
+ - name : Gather facts
18
+ ansible.builtin.setup :
Original file line number Diff line number Diff line change
1
+ ---
2
+ roles : []
Original file line number Diff line number Diff line change
1
+ ---
2
+ # This is an example playbook to execute Ansible tests.
3
+
4
+ - name : Verify
5
+ hosts : all
6
+ gather_facts : false
7
+ tasks :
8
+ - name : Example assertion
9
+ ansible.builtin.assert :
10
+ that : true
You can’t perform that action at this time.
0 commit comments