Skip to content

Commit

Permalink
Fix Ansible warnings
Browse files Browse the repository at this point in the history
Add support for Ubuntu 18.04 and Debian 9
  • Loading branch information
tersmitten committed Jan 4, 2019
1 parent dd9d4df commit 19de46d
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ script:
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
- if [ "$ANSIBLE_VERSION" = "latest" ]; then ansible-lint tests/test.yml || true; fi
- if [ "$ANSIBLE_VERSION" = "latest" ]; then ansible-lint tests/test.yml; fi

notifications:
email: false
Expand Down
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ubuntu:16.04
MAINTAINER Mischa ter Smitten <mtersmitten@oefenweb.nl>

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

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

# provision
COPY . /etc/ansible/roles/ansible-role
WORKDIR /etc/ansible/roles/ansible-role
RUN ansible-playbook -i tests/inventory tests/test.yml --connection=local
18 changes: 16 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,31 @@ boxes = [
:cpu => "50",
:ram => "256"
},
{
:name => "ubuntu-1804",
:box => "bento/ubuntu-18.04",
:ip => '10.0.0.14',
:cpu => "50",
:ram => "256"
},
{
:name => "debian-7",
:box => "bento/debian-7",
:ip => '10.0.0.14',
:ip => '10.0.0.15',
:cpu => "50",
:ram => "256"
},
{
:name => "debian-8",
:box => "bento/debian-8",
:ip => '10.0.0.15',
:ip => '10.0.0.16',
:cpu => "50",
:ram => "256"
},
{
:name => "debian-9",
:box => "bento/debian-9",
:ip => '10.0.0.17',
:cpu => "50",
:ram => "256"
},
Expand Down
9 changes: 8 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# meta file for phpmemcachedadmin
---
galaxy_info:
role_name: phpmemcachedadmin
author: Mischa ter Smitten
company: Oefenweb.nl B.V.
description: Set up phpMemcachedAdmin (Memcached server admin in php for monitoring and debugging)
Expand All @@ -12,13 +13,19 @@ galaxy_info:
- precise
- trusty
- xenial
- bionic
- name: Debian
versions:
- wheezy
- jessie
- stretch
galaxy_tags:
- system
- web
- database
- database:nosql
- nosql
- php
- memcached
- monitoring
- debugging
dependencies: []
6 changes: 4 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
- phpmemcachedadmin-install-unarchive

- name: set file permissions
shell: find . -type f ! -perm 0644 -print0 | xargs --no-run-if-empty -0 chmod -c 0644
shell: >
find . -type f ! -perm 0644 -print0 | xargs --no-run-if-empty -0 chmod -c 0644
args:
chdir: "{{ item.dest }}/phpMemcachedAdmin-{{ phpmemcachedadmin_version }}"
register: _file_permissions
Expand All @@ -35,7 +36,8 @@
- phpmemcachedadmin-install-file-permissions

- name: set dir permissions
shell: find . -type d ! -perm 0755 -print0 | xargs --no-run-if-empty -0 chmod -c 0755
shell: >
find . -type d ! -perm 0755 -print0 | xargs --no-run-if-empty -0 chmod -c 0755
args:
chdir: "{{ item.dest }}/phpMemcachedAdmin-{{ phpmemcachedadmin_version }}"
register: _dir_permissions
Expand Down

0 comments on commit 19de46d

Please sign in to comment.