Skip to content

Commit

Permalink
Merge pull request #11 from CoffeeITWorks/develop
Browse files Browse the repository at this point in the history
fix molecule tests and galaxy meta
  • Loading branch information
pablodav authored Apr 4, 2021
2 parents a2940ea + c32c674 commit 4f27521
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ before_install:

install:
- sudo apt-get install -y python-pip libssl-dev libffi-dev
- pip install molecule
- pip install docker-py
- pip install ansible
- pip install "molecule[docker]"
#- ansible-galaxy install -r requirements.yml

script:
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
galaxy_info:
author: Diego Daguerre, Pablo Estigarribia
author: coffeeitworks
description: Install thruk interface, prepared to be compatible with pnp4nagios, nagios_plugins
license: GPLv2
min_ansible_version: 2.0
Expand Down
4 changes: 2 additions & 2 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ platforms:

- name: ansible_nagios4_server_thruk-01
image: "geerlingguy/docker-ubuntu1804-ansible:latest"
#privileged: True
privileged: True
command: /sbin/init
pre_build_image: true
capabilities:
Expand All @@ -26,7 +26,7 @@ platforms:

- name: ansible_nagios4_server_thruk-02
image: "geerlingguy/docker-ubuntu1604-ansible:latest"
#privileged: True
privileged: True
command: /sbin/init
pre_build_image: true
capabilities:
Expand Down
2 changes: 1 addition & 1 deletion tasks/config_nagios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# file: tasks/config_nagios.yml


- name: Configure localhost_thruk.cfg
- name: config_nagios | Configure localhost_thruk.cfg
template:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
Expand Down
7 changes: 0 additions & 7 deletions tasks/install_thruk.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
---
# file: tasks/install_thruk.yml

- name: install_thruk | Install thruk dependencies
package:
name: "{{ thruk_dependencies | join(',') }}"
state: present
environment:
DEBIAN_FRONTEND: noninteractive

- name: install_thruk | Install thruk packages
package:
Expand Down
14 changes: 11 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@
- config_nagios_thruk_cron
- test_nagios_thruk

- name: Ensure download directory is present
- name: main | Ensure download directory is present
file:
path: "{{ download_dir }}"
state: directory


# Dependency gpg-agent required before running apt-key ansible module
- name: main | Install thruk dependencies
package:
name: "{{ thruk_dependencies | join(',') }}"
state: present
environment:
DEBIAN_FRONTEND: noninteractive

- include: repositories.yml

- include: install_thruk.yml
Expand All @@ -31,4 +39,4 @@

- include: tests.yml
tags:
- test_nagios_thruk
- test_nagios_thruk
4 changes: 2 additions & 2 deletions tasks/multi_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Best practices for OS Specific variables
# https://monkeyswithbuttons.wordpress.com/2014/04/03/multi-os-support-in-ansible/
# http://docs.ansible.com/ansible/playbooks_best_practices.html
- name: Gather OS Specific Variables
- name: multi_os | Gather OS Specific Variables
include_vars: "{{ item }}"
with_first_found:
- "../vars/{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml"
Expand All @@ -15,7 +15,7 @@
# http://pkgs.org
# And ofcourse any good documentation

- name: Include Distribution version specific variables for major_version
- name: multi_os | Include Distribution version specific variables for major_version
include_vars: "{{ item }}"
with_first_found:
- files:
Expand Down
5 changes: 3 additions & 2 deletions vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ thruk_dependencies:
- dialog
- graphviz
- libapache2-mod-fcgid
- libapache2-mod-fastcgi
- apache2-utils
- libdbi1
- libevent-1.4-2
Expand Down Expand Up @@ -45,9 +44,11 @@ thruk_dependencies:
- poppler-utils
- nagios-images # Installs /usr/share/nagios3/htdocs/images/logos/
- locales
- gpg
- gpg-agent

thruk_packages:
- thruk # on repository

thruk_enable_fastcgi: true
thruk_enable_fastcgi: false

4 changes: 2 additions & 2 deletions vars/Ubuntu-18.yml → vars/Ubuntu-16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ thruk_dependencies:
- dialog
- graphviz
- libapache2-mod-fcgid
- libapache2-mod-fastcgi
- apache2-utils
- libdbi1
- libevent-1.4-2
Expand Down Expand Up @@ -48,5 +49,4 @@ thruk_dependencies:
thruk_packages:
- thruk # on repository

thruk_enable_fastcgi: false

thruk_enable_fastcgi: true

0 comments on commit 4f27521

Please sign in to comment.