Skip to content

Commit

Permalink
Merge pull request #143 from danragnar/fix/fedora
Browse files Browse the repository at this point in the history
Add fedora as OS
  • Loading branch information
jaredledvina authored Feb 22, 2018
2 parents 7051641 + c471aa6 commit 9ab303d
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ env:
- distro: ubuntu1604
- distro: debian8
- distro: debian9
- distro: fedora27
before_install:
- 'docker pull geerlingguy/docker-${distro}-ansible:latest'
script:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ This project adheres to [Semantic Versioning](http://semver.org/)
The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [Unreleased]
### Added
- Fedora support. Tested in the wild on Fedora 25 as a client and Fedora 27 on the test suite as both master and client.
- `tasks/Fedora/redis.yml`, `tasks/Fedora/rabbit.yml`: Based on CentOS equivalents but with dnf module instead of yum
- `tasks/Fedora/main.yml`, `tasks/Fedora/dashboard.yml`: links to Centos files
- `vars/Fedora.yml`: vars for Fedora

### Changed
- `tasks/CentOS/dashboard.yml`, `tasks/CentOS/main.yml`: Use generic package module to support Fedora

## [2.1.0]
### Fixed
Expand Down
4 changes: 2 additions & 2 deletions tasks/CentOS/dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
- include_vars: "{{ ansible_distribution }}.yml"

- name: Ensure Uchiwa is installed
yum:
package:
name: uchiwa
state: present
when: not se_enterprise

- name: Ensure Sensu Enterprise Dashboard is installed
yum:
package:
name: "{{ sensu_enterprise_dashboard_package }}"
state: present
when: se_enterprise
Expand Down
4 changes: 2 additions & 2 deletions tasks/CentOS/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
when: se_enterprise

- name: Ensure Sensu is installed
yum:
package:
name: "{{sensu_package }}-{{sensu_pkg_version}}"
state: "{{ sensu_pkg_state }}"

- name: Ensure Sensu Enterprise is installed
yum:
package:
name={{ sensu_enterprise_package }}
state={{ sensu_pkg_state }}
when: se_enterprise
1 change: 1 addition & 0 deletions tasks/Fedora/dashboard.yml
1 change: 1 addition & 0 deletions tasks/Fedora/main.yml
34 changes: 34 additions & 0 deletions tasks/Fedora/rabbit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# tasks/Fedora/rabbit.yml: Deploy RabbitMQ
# Specific to Fedora

- include_vars: "{{ ansible_distribution }}.yml"

- name: Add RabbitMQ's repo
yum_repository:
name: rabbitmq
description: rabbitmq
baseurl: "https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.7.x/el/7"
gpgcheck: yes
gpgkey: https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck: no

- name: Add RabbitMQ's Erlang repo
yum_repository:
name: rabbitmq-erlang
description: rabbitmq-erlang
baseurl: "https://dl.bintray.com/rabbitmq/rpm/erlang/19/el/7"
gpgcheck: yes
gpgkey: https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck: no

- name: Ensure Erlang & RabbitMQ are installed
dnf:
name:
- erlang
- rabbitmq-server
state: present
enablerepo: rabbitmq,rabbitmq-erlang



16 changes: 16 additions & 0 deletions tasks/Fedora/redis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# tasks/Fedora/redis.yml: Deploy redis
# Specific to Fedora

- include_vars: "{{ ansible_distribution }}.yml"

- name: Ensure redis is installed
dnf:
name: "{{ redis_pkg_name }}"
state: "{{ redis_pkg_state }}"

- name: Ensure redis binds to accessible IP
lineinfile:
dest: /etc/redis.conf
regexp: '^bind'
line: 'bind 0.0.0.0'
9 changes: 9 additions & 0 deletions vars/Fedora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# vars/Fedora.yml: Variables for Fedora
# Defaults are defined in defaults/main.yml

# Sensu/Uchiwa user/group/service properties
_sensu_pkg_version: '1.2.1'

#RH/Centos 7 version works for Fedora 25 as a client
sensu_yum_repo_url: "https://sensu.global.ssl.fastly.net/yum/7/$basearch/"

0 comments on commit 9ab303d

Please sign in to comment.