Skip to content

Commit

Permalink
Merge pull request #4 from Oefenweb/consistency-changes
Browse files Browse the repository at this point in the history
Consistency changes
  • Loading branch information
tersmitten authored Jul 7, 2022
2 parents 15fe3bc + c5cb71d commit 11579ff
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 20 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
FROM ubuntu:16.04
FROM ubuntu:18.04
MAINTAINER Mischa ter Smitten <[email protected]>

ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

# python
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y python-minimal python-dev curl && \
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-minimal python3-dev curl && \
apt-get clean
RUN curl -sL https://bootstrap.pypa.io/pip/2.7/get-pip.py | python -
RUN curl -sL https://bootstrap.pypa.io/pip/3.6/get-pip.py | python3 -
RUN rm -rf $HOME/.cache

# ansible
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gcc libffi-dev libssl-dev && \
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-apt && \
apt-get clean
RUN pip install ansible==2.9.15
RUN pip3 install ansible==2.10.7
RUN rm -rf $HOME/.cache

# provision
Expand Down
5 changes: 2 additions & 3 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# meta file
---
galaxy_info:
namespace: oefenweb
author: oefenweb
role_name: ant
author: Mischa ter Smitten
company: Oefenweb.nl B.V.
description: Set up Apache Ant
license: MIT
min_ansible_version: 2.9.0
min_ansible_version: 2.10.0
platforms:
- name: Ubuntu
versions:
Expand Down
6 changes: 6 additions & 0 deletions molecule/default/collections.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
collections:
- name: community.docker
version: '>=1.2.0,<2'
- name: community.general
version: '>=2,<3'
2 changes: 1 addition & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
become: true
pre_tasks:
- name: include vars
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
ansible.builtin.include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
roles:
- ../../../
2 changes: 1 addition & 1 deletion molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
become: true
tasks:
- name: include tasks
include: "{{ playbook_dir }}/../../tests/tasks/pre.yml"
ansible.builtin.include: "{{ playbook_dir }}/../../tests/tasks/pre.yml"
3 changes: 3 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# requirements file
---
collections: []
8 changes: 4 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tasks file
---
- name: create (download) directory
file:
ansible.builtin.file:
path: "{{ ant_downloads_path }}"
state: directory
owner: root
Expand All @@ -13,7 +13,7 @@
- ant-download

- name: download
get_url:
ansible.builtin.get_url:
url: "http://apache.cs.uu.nl/ant/binaries/apache-ant-{{ ant_version }}-bin.tar.gz"
dest: "{{ ant_downloads_path }}/apache-ant-{{ ant_version }}-bin.tar.gz"
owner: root
Expand All @@ -25,7 +25,7 @@
- ant-downloads

- name: install
unarchive:
ansible.builtin.unarchive:
src: "{{ ant_downloads_path }}/apache-ant-{{ ant_version }}-bin.tar.gz"
dest: "{{ ant_install_prefix }}"
creates: "{{ ant_install_prefix }}/apache-ant-{{ ant_version }}"
Expand All @@ -36,7 +36,7 @@
- ant-install

- name: verify
command: >
ansible.builtin.command: >
{{ ant_install_prefix }}/apache-ant-{{ ant_version }}/bin/ant -version
changed_when: false
tags:
Expand Down
4 changes: 2 additions & 2 deletions tests/tasks/pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---
# See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
- name: ensure man directory
file:
ansible.builtin.file:
path: /usr/share/man/man1
state: directory
recurse: true
Expand All @@ -11,7 +11,7 @@
- ansible_distribution_major_version is version('18', '>=')

- name: install dependencies
apt:
ansible.builtin.apt:
name:
- default-jre
state: "{{ apt_install_state | default('latest') }}"
Expand Down
4 changes: 2 additions & 2 deletions tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
become: true
pre_tasks:
- name: include vars
include_vars: "{{ playbook_dir }}/vars/main.yml"
ansible.builtin.include_vars: "{{ playbook_dir }}/vars/main.yml"
- name: include tasks
include: "{{ playbook_dir }}/tasks/pre.yml"
ansible.builtin.include: "{{ playbook_dir }}/tasks/pre.yml"
roles:
- ../../
4 changes: 2 additions & 2 deletions tests/vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
become: true
pre_tasks:
- name: include vars
include_vars: "{{ playbook_dir }}/vars/main.yml"
ansible.builtin.include_vars: "{{ playbook_dir }}/vars/main.yml"
- name: include tasks
include: "{{ playbook_dir }}/tasks/pre.yml"
ansible.builtin.include: "{{ playbook_dir }}/tasks/pre.yml"
roles:
- ../../

0 comments on commit 11579ff

Please sign in to comment.