Skip to content

Commit 747057a

Browse files
authored
Merge pull request #3 from Oefenweb/consistency-changes
Consistency changes
2 parents 85b7d90 + 9644dc7 commit 747057a

File tree

7 files changed

+46
-34
lines changed

7 files changed

+46
-34
lines changed

.ansible-lint

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
warn_list:
33
- role-name
44
- name[casing]
5-
- '306'

.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: gnu_parallel
6-
author: Mischa ter Smitten
76
company: Oefenweb.nl B.V.
87
description: Set up the latest version of GNU Parallel 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: 24 additions & 21 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: "{{ gnu_parallel_dependencies }}"
66
state: "{{ apt_install_state | default('latest') }}"
77
update_cache: true
@@ -13,7 +13,7 @@
1313
- gnu-parallel-install-dependencies
1414

1515
- name: remove (distro version)
16-
apt:
16+
ansible.builtin.apt:
1717
name: parallel
1818
state: absent
1919
purge: true
@@ -25,7 +25,7 @@
2525
- gnu-parallel-remove-distro
2626

2727
- name: create (download) directory
28-
file:
28+
ansible.builtin.file:
2929
path: "{{ gnu_parallel_download_path }}"
3030
state: directory
3131
owner: root
@@ -38,7 +38,7 @@
3838
- gnu-parallel-install-download
3939

4040
- name: download (latest)
41-
get_url:
41+
ansible.builtin.get_url:
4242
url: "{{ gnu_parallel_download_url }}"
4343
dest: "{{ gnu_parallel_download_path }}/{{ gnu_parallel_download_url | basename }}"
4444
owner: root
@@ -52,7 +52,7 @@
5252
- gnu-parallel-install-download
5353

5454
- name: create (build) directory
55-
file:
55+
ansible.builtin.file:
5656
path: "{{ gnu_parallel_build_path }}"
5757
state: directory
5858
owner: root
@@ -64,8 +64,8 @@
6464
- gnu-parallel-install
6565
- gnu-parallel-install-build
6666

67-
- name: version check
68-
shell: >
67+
- name: version check # noqa risky-shell-pipe
68+
ansible.builtin.shell: >
6969
tar -jtf {{ gnu_parallel_download_path }}/{{ gnu_parallel_download_url | basename }} | head -n 1
7070
args:
7171
warn: false
@@ -78,7 +78,7 @@
7878
- gnu-parallel-install-build
7979

8080
- name: extract
81-
unarchive:
81+
ansible.builtin.unarchive:
8282
src: "{{ gnu_parallel_download_path }}/{{ gnu_parallel_download_url | basename }}"
8383
dest: "{{ gnu_parallel_build_path }}"
8484
creates: "{{ gnu_parallel_build_path }}/{{ _version_check.stdout }}"
@@ -90,41 +90,44 @@
9090
- gnu-parallel-install
9191
- gnu-parallel-install-build
9292

93-
- block:
93+
- name: install # noqa no-handler
94+
when: _unarchive is changed
95+
tags:
96+
- configuration
97+
- gnu-parallel
98+
- gnu-parallel-install
99+
- gnu-parallel-install-build
100+
block:
94101

95102
- name: configure
96-
command: >
103+
ansible.builtin.command: >
97104
./configure
98105
args:
99106
chdir: "{{ gnu_parallel_build_path }}/{{ _version_check.stdout }}"
107+
changed_when: true
100108
tags:
101109
- gnu-parallel-install-build-configure
102110

103111
- name: make
104-
command: >
112+
ansible.builtin.command: >
105113
make -j{{ ansible_processor_cores + 1 }}
106114
args:
107115
chdir: "{{ gnu_parallel_build_path }}/{{ _version_check.stdout }}"
116+
changed_when: true
108117
tags:
109118
- gnu-parallel-install-build-make
110119

111120
- name: make install
112-
command: >
121+
ansible.builtin.command: >
113122
make install
114123
args:
115124
chdir: "{{ gnu_parallel_build_path }}/{{ _version_check.stdout }}"
125+
changed_when: true
116126
tags:
117127
- gnu-parallel-install-build-make-install
118128

119-
when: _unarchive is changed
120-
tags:
121-
- configuration
122-
- gnu-parallel
123-
- gnu-parallel-install
124-
- gnu-parallel-install-build
125-
126129
- name: silence citation notice
127-
copy:
130+
ansible.builtin.copy:
128131
src: root/.parallel
129132
dest: "{{ ansible_env.HOME }}/"
130133
owner: "{{ ansible_env.USER }}"
@@ -136,7 +139,7 @@
136139
- gnu-parallel-silence-citation-notice
137140

138141
- name: verify
139-
command: >
142+
ansible.builtin.command: >
140143
parallel --version
141144
changed_when: false
142145
tags:

0 commit comments

Comments
 (0)