Skip to content

Commit cfe72d5

Browse files
Merge pull request #54 from alinabuzachis/fix_ci
Fix CI
2 parents cc4ca44 + ca81246 commit cfe72d5

File tree

12 files changed

+30
-86
lines changed

12 files changed

+30
-86
lines changed

.github/workflows/linters.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@ concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
55
cancel-in-progress: true
66

7-
'on':
7+
on:
88
push:
99
pull_request:
1010

1111
jobs:
12-
linters:
13-
uses: ansible-network/github_actions/.github/workflows/tox-linters.yml@main
1412
ansible-lint:
1513
runs-on: ubuntu-latest
1614
steps:
17-
- uses: ansible-network/github_actions/.github/actions/checkout_dependency@main
15+
- uses: actions/checkout@v4
1816

1917
- name: Run ansible-lint
20-
uses: ansible/ansible-lint-action@main
21-
with:
22-
action_ref: v6.17.2
18+
uses: ansible/[email protected]
19+
20+
tox-linters:
21+
uses: ansible-network/github_actions/.github/workflows/tox-linters.yml@main

.github/workflows/sanity.yml

-64
Original file line numberDiff line numberDiff line change
@@ -14,70 +14,6 @@ on:
1414
jobs:
1515
sanity:
1616
uses: ansible-network/github_actions/.github/workflows/sanity.yml@main
17-
with:
18-
matrix_include: "[]"
19-
matrix_exclude: >-
20-
[
21-
{
22-
"ansible-version": "stable-2.9"
23-
},
24-
{
25-
"ansible-version": "stable-2.12",
26-
"python-version": "3.7"
27-
},
28-
{
29-
"ansible-version": "stable-2.12",
30-
"python-version": "3.11"
31-
},
32-
{
33-
"ansible-version": "stable-2.13",
34-
"python-version": "3.7"
35-
},
36-
{
37-
"ansible-version": "stable-2.13",
38-
"python-version": "3.11"
39-
},
40-
{
41-
"ansible-version": "stable-2.14",
42-
"python-version": "3.7"
43-
},
44-
{
45-
"ansible-version": "stable-2.14",
46-
"python-version": "3.8"
47-
},
48-
{
49-
"ansible-version": "stable-2.15",
50-
"python-version": "3.7"
51-
},
52-
{
53-
"ansible-version": "stable-2.15",
54-
"python-version": "3.8"
55-
},
56-
{
57-
"ansible-version": "milestone",
58-
"python-version": "3.7"
59-
},
60-
{
61-
"ansible-version": "milestone",
62-
"python-version": "3.8"
63-
},
64-
{
65-
"ansible-version": "milestone",
66-
"python-version": "3.9"
67-
},
68-
{
69-
"ansible-version": "devel",
70-
"python-version": "3.7"
71-
},
72-
{
73-
"ansible-version": "devel",
74-
"python-version": "3.8"
75-
},
76-
{
77-
"ansible-version": "devel",
78-
"python-version": "3.9"
79-
}
80-
]
8117
all_green:
8218
if: ${{ always() }}
8319
needs:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The collection includes a variety of Ansible roles and playbook to help automate
77
<!--start requires_ansible-->
88
## Ansible version compatibility
99

10-
This collection has been tested against following Ansible versions: **>=2.13.0**.
10+
This collection has been tested against following Ansible versions: **>=2.14.0**.
1111

1212
## Included content
1313

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
breaking_changes:
2+
- "Update README.md and meta/runtime.yml to reflect our ansible core testing versions."
3+
4+
trivial:
5+
- "Increase ansible-lint version to 1.22"
6+
7+
bugfixes:
8+
- roles/azure_manage_resource_group - Ensure the correct variable name is used for the operation.
9+
- roles/azure_virtual_machine_with_public_ip - Ensure the correct variables names are defined inside defaults.

meta/runtime.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
requires_ansible: '>=2.13.0'
1+
requires_ansible: '>=2.14.0'
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
# defaults file for resource_group
3-
operation: create
3+
azure_manage_resource_group_operation: create

roles/azure_manage_resource_group/tasks/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
- name: Check operation validation
2+
- name: Check azure_manage_resource_group_operation validation
33
ansible.builtin.fail:
4-
msg: Please provide operation as 'create' or 'delete'
4+
msg: Please provide azure_manage_resource_group_operation as 'create' or 'delete'
55
when: azure_manage_resource_group_operation not in ['create', 'delete']
66

77
- name: Check Resource group name

roles/azure_virtual_machine_with_public_ip/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Role Variables
1212
--------------
1313

1414
* **azure_virtual_machine_with_public_ip_operation**: Operation to perform. Valid values are 'create', 'delete', 'power_on', 'power_off', 'deallocate', 'restart'. Default is 'create'.
15-
* **azure_virtual_machine_with_public_ip_remove_on_absent**: Specify which resources to remove when `operation='delete'`. 'all' removes all resources attached to the VM being removed; 'all_autocreated' removes the resources that were automatically created while provisioning the VM (public ip, network interface, security group). To remove only specific resources, use the values 'network_interfaces', 'virtual_storage', or 'public_ips'. The default value is 'all'.
16-
* **azure_virtual_machine_with_public_ip_resource_group**: Resource group on/from which the virtual machine will reside. When `operation='create'`, this resource group will be created if it does not exist.
15+
* **azure_virtual_machine_with_public_ip_remove_on_absent**: Specify which resources to remove when `azure_virtual_machine_with_public_ip_operation='delete'`. 'all' removes all resources attached to the VM being removed; 'all_autocreated' removes the resources that were automatically created while provisioning the VM (public ip, network interface, security group). To remove only specific resources, use the values 'network_interfaces', 'virtual_storage', or 'public_ips'. The default value is 'all'.
16+
* **azure_virtual_machine_with_public_ip_resource_group**: Resource group on/from which the virtual machine will reside. When `azure_virtual_machine_with_public_ip_operation='create'`, this resource group will be created if it does not exist.
1717
* **azure_virtual_machine_with_public_ip_region**: An Azure location for the resources.
1818
* **azure_virtual_machine_with_public_ip_tags**: Dictionary of string:string pairs to assign as metadata to the resource group.
1919
* **azure_virtual_machine_with_public_ip_vm**: Object used to provide details for a virtual machine. Contains the following:
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
# defaults file for virtual_machine
3-
operation: create
4-
azure_vm: {}
5-
remove_on_absent: all
3+
azure_virtual_machine_with_public_ip_operation: create
4+
azure_virtual_machine_with_public_ip_vm: {}
5+
azure_virtual_machine_with_public_ip_remove_on_absent: all

roles/azure_virtual_machine_with_public_ip/tasks/create.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
- name: default
5656
primary: true
5757
public_ip_address_name: "{{ vm_name }}"
58-
load_balancer_backend_address_pools: "{{ azure_vm.load_balancer_backend_address_pools | default(omit) }}"
58+
load_balancer_backend_address_pools: "{{ azure_virtual_machine_with_public_ip_vm.load_balancer_backend_address_pools | default(omit) }}"
5959

6060
- name: Tag all autocreated resources for cleanup
6161
ansible.builtin.set_fact:
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
- name: Fail on invalid delete option
33
ansible.builtin.fail:
4-
msg: Invalid value for remove_on_absent. Valid values include 'all', 'all_autocreated', 'network_interfaces', 'virtual_storage', or 'public_ips'
5-
when: remove_on_absent not in ['all', 'all_autocreated', 'network_interfaces', 'virtual_storage', 'public_ips']
4+
msg: Invalid value for azure_virtual_machine_with_public_ip_remove_on_absent. Valid values include 'all', 'all_autocreated', 'network_interfaces', 'virtual_storage', or 'public_ips'
5+
when: azure_virtual_machine_with_public_ip_remove_on_absent not in ['all', 'all_autocreated', 'network_interfaces', 'virtual_storage', 'public_ips']
66

77
- name: Fail when resource group doesn't exist
88
ansible.builtin.fail:
@@ -13,5 +13,5 @@
1313
azure.azcollection.azure_rm_virtualmachine:
1414
resource_group: "{{ azure_resource_group }}"
1515
name: "{{ vm_name }}"
16-
remove_on_absent: "{{ remove_on_absent | default(omit) }}"
16+
remove_on_absent: "{{ azure_virtual_machine_with_public_ip_remove_on_absent | default(omit) }}"
1717
state: absent

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ skipsdist = True
55
[testenv:ansible-lint]
66
; There is currently a bug in ansible-lint 6.8.6: https://github.com/ansible/ansible-lint/issues/2673
77
deps =
8-
ansible-lint==v6.17.2
8+
ansible-lint==v6.22.0
99
commands = ansible-lint --show-relpath
1010

1111
[testenv:linters]

0 commit comments

Comments
 (0)