File tree Expand file tree Collapse file tree 6 files changed +23
-22
lines changed Expand file tree Collapse file tree 6 files changed +23
-22
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
warn_list:
3
3
- role-name
4
+ - name[play]
4
5
- name[casing]
Original file line number Diff line number Diff line change 23
23
python-version : ' 3.x'
24
24
25
25
- name : Install test dependencies
26
- run : pip install ansible-lint[community,yamllint]
26
+ run : |
27
+ pip install ansible-lint
28
+ ansible-galaxy install -r requirements.yml
27
29
28
30
- name : Lint code
29
31
run : |
43
45
matrix :
44
46
include :
45
47
- distro : debian8
46
- ansible-version : ' <2.10'
47
48
- distro : debian9
48
49
- distro : debian10
49
- - distro : ubuntu1604
50
- ansible-version : ' >=2.9, <2.10'
51
50
- distro : ubuntu1604
52
51
ansible-version : ' >=2.10, <2.11'
53
52
- distro : ubuntu1604
66
65
python-version : ' 3.x'
67
66
68
67
- name : Install test dependencies
69
- run : pip install 'ansible${{ matrix.ansible-version }}' molecule[docker] docker
68
+ run : pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins [docker] docker
70
69
71
70
- name : Run Molecule tests
72
71
run : |
Original file line number Diff line number Diff line change 1
1
# handlers file
2
2
---
3
- - name : apply netplan config
4
- command : >
3
+ - name : apply netplan config # noqa no-changed-when
4
+ ansible.builtin. command : >
5
5
netplan apply
6
6
listen : netplan apply config
7
7
8
- - name : generate netplan config
9
- command : >
8
+ - name : generate netplan config # noqa no-changed-when
9
+ ansible.builtin. command : >
10
10
netplan generate
11
11
listen : netplan generate config
12
12
notify : netplan apply config
Original file line number Diff line number Diff line change 1
1
# tasks file
2
2
---
3
- - block :
4
-
3
+ - name : configure
4
+ when : netplan_conf_purge | bool
5
+ tags :
6
+ - netplan-configure-purge
7
+ block :
5
8
- name : configure | find existing
6
- find :
9
+ ansible.builtin. find :
7
10
paths : " {{ netplan_conf_path }}"
8
11
patterns : ' *.yaml,*.yml'
9
12
register : _netplan_existing_files
10
13
11
14
- name : configure | remove existing
12
- file :
15
+ ansible.builtin. file :
13
16
path : " {{ item['path'] }}"
14
17
state : absent
15
18
with_items : " {{ _netplan_existing_files['files'] }}"
16
19
when :
17
20
- item['path'] != netplan_conf_path + '/' + netplan_conf_file
18
21
notify : netplan generate config
19
22
20
- when : netplan_conf_purge | bool
21
- tags :
22
- - netplan-configure-purge
23
-
24
23
- name : configure | update
25
- template :
24
+ ansible.builtin. template :
26
25
src : etc/netplan/config.yaml.j2
27
26
dest : " {{ netplan_conf_path }}/{{ netplan_conf_file }}"
28
27
mode : 0644
Original file line number Diff line number Diff line change 1
1
# tasks file
2
2
---
3
3
- name : install | dependencies
4
- apt :
4
+ ansible.builtin. apt :
5
5
name : " {{ netplan_dependencies }}"
6
6
state : " {{ apt_install_state | default('latest') }}"
7
7
update_cache : true
10
10
- netplan-install-dependencies
11
11
12
12
- name : install | additional
13
- apt :
13
+ ansible.builtin. apt :
14
14
name : " {{ netplan_install }}"
15
15
state : " {{ apt_install_state | default('latest') }}"
16
16
tags :
Original file line number Diff line number Diff line change 1
1
# tasks file
2
2
---
3
- - import_tasks : install.yml
3
+ - name : install
4
+ ansible.builtin.import_tasks : install.yml
4
5
tags :
5
6
- configuration
6
7
- netplan
7
8
- netplan-install
8
9
9
- - import_tasks : configure.yml
10
+ - name : configure
11
+ ansible.builtin.import_tasks : configure.yml
10
12
tags :
11
13
- configuration
12
14
- netplan
You can’t perform that action at this time.
0 commit comments