Skip to content

Commit cd993ec

Browse files
authored
Merge pull request #3 from Oefenweb/consistency-changes
Consistency changes
2 parents f185cd3 + 13eb49f commit cd993ec

File tree

6 files changed

+23
-22
lines changed

6 files changed

+23
-22
lines changed

.ansible-lint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
22
warn_list:
33
- role-name
4+
- name[play]
45
- name[casing]

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
python-version: '3.x'
2424

2525
- 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
2729
2830
- name: Lint code
2931
run: |
@@ -43,11 +45,8 @@ jobs:
4345
matrix:
4446
include:
4547
- distro: debian8
46-
ansible-version: '<2.10'
4748
- distro: debian9
4849
- distro: debian10
49-
- distro: ubuntu1604
50-
ansible-version: '>=2.9, <2.10'
5150
- distro: ubuntu1604
5251
ansible-version: '>=2.10, <2.11'
5352
- distro: ubuntu1604
@@ -66,7 +65,7 @@ jobs:
6665
python-version: '3.x'
6766

6867
- 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
7069

7170
- name: Run Molecule tests
7271
run: |

handlers/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# handlers file
22
---
3-
- name: apply netplan config
4-
command: >
3+
- name: apply netplan config # noqa no-changed-when
4+
ansible.builtin.command: >
55
netplan apply
66
listen: netplan apply config
77

8-
- name: generate netplan config
9-
command: >
8+
- name: generate netplan config # noqa no-changed-when
9+
ansible.builtin.command: >
1010
netplan generate
1111
listen: netplan generate config
1212
notify: netplan apply config

tasks/configure.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
# tasks file
22
---
3-
- block:
4-
3+
- name: configure
4+
when: netplan_conf_purge | bool
5+
tags:
6+
- netplan-configure-purge
7+
block:
58
- name: configure | find existing
6-
find:
9+
ansible.builtin.find:
710
paths: "{{ netplan_conf_path }}"
811
patterns: '*.yaml,*.yml'
912
register: _netplan_existing_files
1013

1114
- name: configure | remove existing
12-
file:
15+
ansible.builtin.file:
1316
path: "{{ item['path'] }}"
1417
state: absent
1518
with_items: "{{ _netplan_existing_files['files'] }}"
1619
when:
1720
- item['path'] != netplan_conf_path + '/' + netplan_conf_file
1821
notify: netplan generate config
1922

20-
when: netplan_conf_purge | bool
21-
tags:
22-
- netplan-configure-purge
23-
2423
- name: configure | update
25-
template:
24+
ansible.builtin.template:
2625
src: etc/netplan/config.yaml.j2
2726
dest: "{{ netplan_conf_path }}/{{ netplan_conf_file }}"
2827
mode: 0644

tasks/install.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: install | dependencies
4-
apt:
4+
ansible.builtin.apt:
55
name: "{{ netplan_dependencies }}"
66
state: "{{ apt_install_state | default('latest') }}"
77
update_cache: true
@@ -10,7 +10,7 @@
1010
- netplan-install-dependencies
1111

1212
- name: install | additional
13-
apt:
13+
ansible.builtin.apt:
1414
name: "{{ netplan_install }}"
1515
state: "{{ apt_install_state | default('latest') }}"
1616
tags:

tasks/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# tasks file
22
---
3-
- import_tasks: install.yml
3+
- name: install
4+
ansible.builtin.import_tasks: install.yml
45
tags:
56
- configuration
67
- netplan
78
- netplan-install
89

9-
- import_tasks: configure.yml
10+
- name: configure
11+
ansible.builtin.import_tasks: configure.yml
1012
tags:
1113
- configuration
1214
- netplan

0 commit comments

Comments
 (0)