Skip to content

Commit d876803

Browse files
authored
Merge pull request #46 from Oefenweb/consistency-changes
Consistency changes
2 parents 904e5c0 + 3f5f7d9 commit d876803

File tree

15 files changed

+51
-34
lines changed

15 files changed

+51
-34
lines changed

.ansible-lint

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
warn_list:
33
- role-name
4+
- name[play]
45
- name[casing]
5-
- '503'
6+
- no-handler

.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
@@ -73,7 +72,7 @@ jobs:
7372
molecule test
7473
env:
7574
ANSIBLE_FORCE_COLOR: '1'
76-
ANSIBLE_VERBOSITY: '3'
75+
ANSIBLE_VERBOSITY: '2'
7776
MOLECULE_DEBUG: '1'
7877
MOLECULE_DISTRO: "${{ matrix.distro }}"
7978
PY_COLORS: '1'

Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:18.04
22
MAINTAINER Mischa ter Smitten <mtersmitten@oefenweb.nl>
33

4+
ENV LANG C.UTF-8
5+
ENV LC_ALL C.UTF-8
6+
47
# python
58
RUN apt-get update && \
6-
DEBIAN_FRONTEND=noninteractive apt-get install -y python-minimal python-dev curl && \
9+
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-minimal python3-dev curl && \
710
apt-get clean
8-
RUN curl -sL https://bootstrap.pypa.io/pip/2.7/get-pip.py | python -
11+
RUN curl -sL https://bootstrap.pypa.io/pip/3.6/get-pip.py | python3 -
912
RUN rm -rf $HOME/.cache
1013

1114
# ansible
12-
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gcc libffi-dev libssl-dev && \
15+
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-apt && \
1316
apt-get clean
14-
RUN pip install ansible==2.9.15
17+
RUN pip3 install ansible==2.10.7
1518
RUN rm -rf $HOME/.cache
1619

1720
# provision

handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# handlers file
22
---
33
- name: reload ufw
4-
ufw:
4+
community.general.ufw:
55
state: reloaded

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ galaxy_info:
77
company: Oefenweb.nl B.V.
88
description: Set up ufw in Debian-like systems
99
license: MIT
10-
min_ansible_version: 2.9.0
10+
min_ansible_version: 2.10.0
1111
platforms:
1212
- name: Ubuntu
1313
versions:

molecule/default/collections.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
collections:
3+
- name: community.docker
4+
version: '>=1.2.0,<2'
5+
- name: community.general
6+
version: '>=2,<3'

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/molecule.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ platforms:
88
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1604}-ansible:latest"
99
command: ${MOLECULE_DOCKER_COMMAND:-""}
1010
volumes:
11-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
11+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
12+
- /var/lib/containerd
13+
cgroupns_mode: host
1214
privileged: true
1315
pre_build_image: true
14-
capabilities:
15-
- NET_ADMIN
1616
provisioner:
1717
name: ansible
1818
playbooks:

requirements.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# requirements file
2+
---
3+
collections:
4+
- name: community.general
5+
- name: ansible.posix

tasks/configure.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: configure | create (local facts) directory
4-
file:
4+
ansible.builtin.file:
55
path: /etc/ansible/facts.d/
66
state: directory
77
owner: root
@@ -11,7 +11,7 @@
1111
- ufw-configure-facts
1212

1313
- name: configure | update configuration file(s)
14-
template:
14+
ansible.builtin.template:
1515
src: "{{ item.src }}"
1616
dest: "{{ item.dest }}"
1717
owner: root
@@ -27,14 +27,14 @@
2727
- ufw-configure-facts
2828

2929
- name: configure | reset
30-
ufw:
30+
community.general.ufw:
3131
state: reset
3232
when: configuration is changed
3333
tags:
3434
- ufw-configure-reset
3535

3636
- name: configure | default (incoming) policy
37-
ufw:
37+
community.general.ufw:
3838
policy: "{{ ufw_default_incoming_policy }}"
3939
direction: incoming
4040
notify: reload ufw
@@ -43,7 +43,7 @@
4343
- ufw-configure-default-policy-incoming
4444

4545
- name: configure | default (outgoing) policy
46-
ufw:
46+
community.general.ufw:
4747
policy: "{{ ufw_default_outgoing_policy }}"
4848
direction: outgoing
4949
notify: reload ufw
@@ -52,7 +52,7 @@
5252
- ufw-configure-default-policy-outgoing
5353

5454
- name: configure | rules
55-
ufw:
55+
community.general.ufw:
5656
rule: "{{ item.rule }}"
5757
interface: "{{ item.interface | default('') }}"
5858
direction: "{{ item.direction | default('in') }}"
@@ -70,7 +70,7 @@
7070
- ufw-configure-rules
7171

7272
- name: configure | logging
73-
ufw:
73+
community.general.ufw:
7474
logging: "{{ ufw_logging }}"
7575
notify: reload ufw
7676
tags:

0 commit comments

Comments
 (0)