Skip to content

Commit 218e9db

Browse files
authored
Merge pull request #42 from Oefenweb/cs-fixes
Make use of fully-qualified collection name
2 parents a0dcbc2 + 895409b commit 218e9db

6 files changed

Lines changed: 34 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 4 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

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

meta/main.yml

Lines changed: 2 additions & 3 deletions
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: apt
6-
author: Mischa ter Smitten
76
company: Oefenweb.nl B.V.
87
description: Manage packages and up(date|grade)s in Debian-like 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

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'

requirements.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# requirements file
2+
---
3+
collections: []

tasks/main.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: update configuration file - /etc/apt/sources.list
4-
template:
4+
ansible.builtin.template:
55
src: "etc/apt/sources.list.{{ ansible_distribution }}.j2"
66
dest: /etc/apt/sources.list
77
owner: root
@@ -15,7 +15,7 @@
1515
- apt-configuration
1616

1717
- name: update configuration file - /etc/apt/apt.conf
18-
template:
18+
ansible.builtin.template:
1919
src: "{{ apt_apt_conf_file.lstrip('/') }}.j2"
2020
dest: "{{ apt_apt_conf_file }}"
2121
owner: root
@@ -28,7 +28,7 @@
2828
- apt-configuration
2929

3030
- name: remove configuration files - /etc/apt/apt.conf.d/*
31-
file:
31+
ansible.builtin.file:
3232
path: "/etc/apt/apt.conf.d/{{ item }}"
3333
state: absent
3434
with_items: "{{ apt_etc_apt_apt_conf_d_files_absent }}"
@@ -38,7 +38,7 @@
3838
- apt-configuration
3939

4040
- name: ensure directory exists - /var/lib/apt/lists/
41-
file:
41+
ansible.builtin.file:
4242
path: /var/lib/apt/lists/
4343
state: directory
4444
owner: root
@@ -50,7 +50,7 @@
5050
- apt-update
5151

5252
- name: update
53-
apt:
53+
ansible.builtin.apt:
5454
update_cache: true
5555
cache_valid_time: "{{ 0 if apt_config_updated is defined and apt_config_updated.changed else apt_update_cache_valid_time }}"
5656
when: apt_update
@@ -60,7 +60,7 @@
6060
- apt-update
6161

6262
- name: dpkg --configure
63-
command: >
63+
ansible.builtin.command: >
6464
dpkg --configure -a
6565
args:
6666
warn: false
@@ -73,7 +73,7 @@
7373
- apt-dpkg-configure
7474

7575
- name: install dependencies
76-
apt:
76+
ansible.builtin.apt:
7777
name: "{{ apt_dependencies }}"
7878
state: "{{ apt_install_state }}"
7979
tags:
@@ -82,7 +82,7 @@
8282
- apt-dependencies
8383

8484
- name: upgrade
85-
apt:
85+
ansible.builtin.apt:
8686
upgrade: "{{ apt_upgrade_type }}"
8787
update_cache: true
8888
dpkg_options: "{{ apt_upgrade_dpkg_options | join(',') }}"
@@ -93,7 +93,7 @@
9393
- apt-upgrade
9494

9595
- name: clean
96-
command: >
96+
ansible.builtin.command: >
9797
apt-get -y clean
9898
args:
9999
warn: false
@@ -105,7 +105,7 @@
105105
- apt-clean
106106

107107
- name: install
108-
apt:
108+
ansible.builtin.apt:
109109
name: "{{ apt_install }}"
110110
state: "{{ apt_install_state }}"
111111
tags:
@@ -114,7 +114,7 @@
114114
- apt-install
115115

116116
- name: remove
117-
apt:
117+
ansible.builtin.apt:
118118
name: "{{ apt_remove }}"
119119
state: absent
120120
purge: "{{ apt_remove_purge }}"
@@ -124,7 +124,7 @@
124124
- apt-remove
125125

126126
- name: autoremove
127-
apt:
127+
ansible.builtin.apt:
128128
autoremove: true
129129
dpkg_options: "{{ apt_upgrade_dpkg_options | join(',') }}"
130130
when: apt_autoremove

0 commit comments

Comments
 (0)