Skip to content

Commit 0136969

Browse files
authored
Merge pull request #9 from Oefenweb/consistency-changes
Consistency changes
2 parents 325f5f8 + d7f30b4 commit 0136969

File tree

13 files changed

+36
-27
lines changed

13 files changed

+36
-27
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: 5 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,16 +45,14 @@ 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
5453
- distro: ubuntu1804
5554
- distro: ubuntu2004
55+
- distro: ubuntu2204
5656

5757
steps:
5858
- name: Check out the codebase
@@ -66,7 +66,7 @@ jobs:
6666
python-version: '3.x'
6767

6868
- name: Install test dependencies
69-
run: pip install 'ansible${{ matrix.ansible-version }}' molecule[docker] docker
69+
run: pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker
7070

7171
- name: Run Molecule tests
7272
run: |

Vagrantfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ boxes = [
2525
:cpu => "50",
2626
:ram => "384"
2727
},
28+
{
29+
:name => "ubuntu-2204",
30+
:box => "bento/ubuntu-22.04",
31+
:ip => '10.0.0.15',
32+
:cpu => "50",
33+
:ram => "384"
34+
},
2835
{
2936
:name => "debian-8",
3037
:box => "bento/debian-8",

handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# handlers file
22
---
33
- name: restart tinyproxy
4-
service:
4+
ansible.builtin.service:
55
name: tinyproxy
66
state: restarted
77
when: service_default_state | default('started') == 'started'

meta/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ galaxy_info:
1414
- xenial
1515
- bionic
1616
- focal
17+
- jammy
1718
- name: Debian
1819
versions:
1920
- jessie

molecule/default/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
become: true
55
pre_tasks:
66
- name: include vars
7-
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
7+
ansible.builtin.include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
88
roles:
99
- ../../../

molecule/default/prepare.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
become: true
55
tasks:
66
- name: include vars
7-
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
7+
ansible.builtin.include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
88
- name: include tasks
9-
include: "{{ playbook_dir }}/../../tests/tasks/pre.yml"
9+
ansible.builtin.import_tasks: "{{ playbook_dir }}/../../tests/tasks/pre.yml"

molecule/default/verify.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
become: true
55
tasks:
66
- name: include vars
7-
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
7+
ansible.builtin.include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
88
- name: include tasks
9-
include: "{{ playbook_dir }}/../../tests/tasks/post.yml"
9+
ansible.builtin.import_tasks: "{{ playbook_dir }}/../../tests/tasks/post.yml"

tasks/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: include variables
4-
include_vars: "{{ item }}"
4+
ansible.builtin.include_vars: "{{ item }}"
55
with_first_found:
66
- "_{{ ansible_distribution_release }}.yml"
77
- "_{{ ansible_distribution | lower }}.yml"
@@ -12,7 +12,7 @@
1212
- tinyproxy-include-variables
1313

1414
- name: install dependencies
15-
apt:
15+
ansible.builtin.apt:
1616
name: "{{ tinyproxy_dependencies }}"
1717
state: "{{ apt_install_state | default('latest') }}"
1818
update_cache: true
@@ -23,7 +23,7 @@
2323
- tinyproxy-dependencies
2424

2525
- name: install additional
26-
apt:
26+
ansible.builtin.apt:
2727
name: "{{ tinyproxy_install }}"
2828
state: "{{ apt_install_state | default('latest') }}"
2929
tags:
@@ -32,7 +32,7 @@
3232
- tinyproxy-install
3333

3434
- name: update configuration file
35-
template:
35+
ansible.builtin.template:
3636
src: etc/tinyproxy.conf.j2
3737
dest: "{{ tinyproxy_configuration_file }}"
3838
owner: root
@@ -45,7 +45,7 @@
4545
- tinyproxy-configuration
4646

4747
- name: start and enable service
48-
service:
48+
ansible.builtin.service:
4949
name: tinyproxy
5050
state: "{{ service_default_state | default('started') }}"
5151
enabled: "{{ service_default_enabled | default(true) | bool }}"
@@ -58,7 +58,7 @@
5858

5959
# TODO: Remove when support for Ubuntu 14.04 is dropped
6060
- name: start and enable service
61-
service:
61+
ansible.builtin.service:
6262
name: tinyproxy
6363
state: "{{ service_default_state | default('started') }}"
6464
enabled: "{{ service_default_enabled | default(true) | bool }}"

tests/tasks/post.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# post test file
22
---
33
- name: install test dependencies
4-
apt:
4+
ansible.builtin.apt:
55
name:
66
- curl
77
state: "{{ apt_install_state | default('latest') }}"
88
update_cache: true
99
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}"
1010

1111
- name: test tinyproxy installation # noqa command-instead-of-module
12-
command: >
12+
ansible.builtin.command: >
1313
curl -sL --head https://www.google.com --proxy http://{{ ansible_lo['ipv4']['address'] }}:{{ tinyproxy_port }}
1414
register: _result
1515
changed_when: false

0 commit comments

Comments
 (0)