Skip to content

Commit 0771ff4

Browse files
committed
Consistency changes
1 parent b497517 commit 0771ff4

File tree

7 files changed

+28
-22
lines changed

7 files changed

+28
-22
lines changed

.github/workflows/ci.yml

+4-6
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: |
@@ -42,12 +44,8 @@ jobs:
4244
fail-fast: false
4345
matrix:
4446
include:
45-
- distro: ubuntu1604
46-
ansible-version: '>=2.9, <2.10'
47-
molecule_version: "==3.0.8"
4847
- distro: ubuntu1604
4948
ansible-version: '>=2.10, <2.11'
50-
molecule_version: "==3.2.4"
5149
- distro: ubuntu1604
5250
- distro: ubuntu1804
5351
- distro: ubuntu2004
@@ -64,7 +62,7 @@ jobs:
6462
python-version: '3.x'
6563

6664
- name: Install test dependencies
67-
run: pip install 'ansible${{ matrix.ansible-version }}' 'molecule[docker]${{ matrix.molecule_version }}' docker
65+
run: pip install 'ansible${{ matrix.ansible-version }}' molecule[docker] docker
6866

6967
- name: Run Molecule tests
7068
run: |

Dockerfile

+8-5
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 <[email protected]>
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

meta/main.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# meta file
22
---
33
galaxy_info:
4-
namespace: oefenweb
4+
author: oefenweb
55
role_name: haproxy
6-
author: Mischa ter Smitten
76
company: Oefenweb.nl B.V.
87
description: Set up the latest version of HAProxy in Ubuntu systems
98
license: MIT
10-
min_ansible_version: 2.9.0
9+
min_ansible_version: 2.10.0
1110
platforms:
1211
- name: Ubuntu
1312
versions:

molecule/default/collections.yml

+6
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'

tasks/main.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,38 @@
99
- haproxy
1010
- haproxy-check-version-support
1111

12-
- import_tasks: install.yml
12+
- ansible.builtin.import_tasks: install.yml
1313
tags:
1414
- configuration
1515
- haproxy
1616
- haproxy-install
1717

18-
- import_tasks: certificates.yml
18+
- ansible.builtin.import_tasks: certificates.yml
1919
tags:
2020
- configuration
2121
- haproxy
2222
- haproxy-certificates
2323

24-
- import_tasks: acl.yml
24+
- ansible.builtin.import_tasks: acl.yml
2525
tags:
2626
- configuration
2727
- haproxy
2828
- haproxy-acl
2929

30-
- import_tasks: configuration.yml
30+
- ansible.builtin.import_tasks: configuration.yml
3131
tags:
3232
- configuration
3333
- haproxy
3434
- haproxy-configuration
3535

36-
- import_tasks: letsencrypt.yml
36+
- ansible.builtin.import_tasks: letsencrypt.yml
3737
tags:
3838
- configuration
3939
- haproxy
4040
- haproxy-letsencrypt
4141

4242
- name: start and enable service
43-
ansible.builtin.service:
43+
ansible.builtin.ansible.builtin.service:
4444
name: haproxy
4545
state: "{{ service_default_state | default('started') }}"
4646
enabled: "{{ service_default_enabled | default(true) | bool }}"

tests/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
become: true
66
pre_tasks:
77
- name: include vars
8-
include_vars: "{{ playbook_dir }}/vars/main.yml"
8+
ansible.builtin.include_vars: "{{ playbook_dir }}/vars/main.yml"
99
roles:
1010
- ../../

tests/vagrant.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
become: true
66
pre_tasks:
77
- name: include vars
8-
include_vars: "{{ playbook_dir }}/vars/main.yml"
8+
ansible.builtin.include_vars: "{{ playbook_dir }}/vars/main.yml"
99
roles:
1010
- ../../

0 commit comments

Comments
 (0)