瀏覽代碼

Ubuntu 15.04 is EOL, support 16.04 LTS instead

This means we can also install redis from the default repos.
Fixes #75
Stephen Muth 8 年之前
父節點
當前提交
54ddb42581
共有 6 個文件被更改,包括 6 次插入32 次删除
  1. 1 1
      README.md
  2. 1 1
      docs/index.md
  3. 3 3
      docs/role_variables.md
  4. 0 15
      files/redis_systemd.service
  5. 0 11
      tasks/Ubuntu/redis.yml
  6. 1 1
      vars/Ubuntu.yml

+ 1 - 1
README.md

@@ -32,7 +32,7 @@ This role requires:
 - [CentOS - 7](https://wiki.centos.org/Manuals/ReleaseNotes/CentOS7)
 - [Amazon Linux](https://aws.amazon.com/amazon-linux-ami/) - only client side support is tested
 - [Debian - 8 (Jessie)](https://wiki.debian.org/DebianJessie)
-- [Ubuntu - 15.04 (Vivid Vervet)](http://releases.ubuntu.com/15.04/)
+- [Ubuntu - 16.04 (Vivid Vervet)](http://releases.ubuntu.com/16.04/)
 - [FreeBSD - 10.3, 11.0 (64-bit only)](https://www.freebsd.org/releases/10.2R/relnotes.html)
 
 ### Future Releases

+ 1 - 1
docs/index.md

@@ -24,7 +24,7 @@ This role requires Ansible 2.0
 - [SmartOS - base-64 15.x.x](https://docs.joyent.com/images/smartos/base#version-15xx)
 - [CentOS - 7](https://wiki.centos.org/Manuals/ReleaseNotes/CentOS7)
 - [Debian - 8 (Jessie)](https://wiki.debian.org/DebianJessie)
-- [Ubuntu - 15.04 (Vivid Vervet)](http://releases.ubuntu.com/15.04/)
+- [Ubuntu - 16.04 (Vivid Vervet)](http://releases.ubuntu.com/16.04/)
 - [FreeBSD - 10.3, 11.0 (64-bit only)](https://www.freebsd.org/releases/10.2R/relnotes.html)
 
 ### Future Releases

+ 3 - 3
docs/role_variables.md

@@ -28,6 +28,7 @@ _Note: The above options are intended to provide users with flexibility. This al
 |--------------------|---------------|------------------------------|
 | `redis_host` | `"{{ groups['redis_servers'][0] }}"` | Hostname/IP address of the redis node |
 | `redis_server` | `false` | Determines whether to include the deployment of redis |
+| `redis_service_name` | redis |  The name of the redis service to enable |
 | `redis_pkg_repo` | _undefined_ |  The PPA to use for installing redis from (specific to Debian flavored systems) |
 | `redis_pkg_name` | redis |  The name of the redis package to install |
 | `redis_pkg_state` | present | The state of the redis package (should be set to `present` or `latest`) |
@@ -84,9 +85,8 @@ _Note: The above options are intended to provide users with flexibility. This al
 ### [redis Server Properties](https://sensuapp.org/docs/latest/reference/redis)
 | Name               | Default Value | Description                  |
 |--------------------|---------------|------------------------------|
-| `redis_pkg_repo`   | `'ppa:rwky/redis'` | The PPA to use for installing redis from |
 | `redis_pkg_name` | redis-server |  The name of the redis package to install |
-
+| `redis_service_name` | redis-server | The name of the redis service |
 
 ### [Sensu Properties](https://sensuapp.org/docs/latest/installation/overview)
 | Name               | Default Value | Description                  |
@@ -98,7 +98,7 @@ _Note: The above options are intended to provide users with flexibility. This al
 ### [redis Server Properties](https://sensuapp.org/docs/latest/reference/redis)
 | Name               | Default Value | Description                  |
 |--------------------|---------------|------------------------------|
-| `redis_pkg_repo`   | `'ppa:rwky/redis'` | The PPA to use for installing redis from |
+| `redis_pkg_name` | redis-server | The name of the redis service |
 | `redis_service_name` | redis-server | The name of the redis service |
 
 ### [Sensu Properties](https://sensuapp.org/docs/latest/installation/overview)

+ 0 - 15
files/redis_systemd.service

@@ -1,15 +0,0 @@
-[Unit]
-Description=redis Datastore Server
-After=network.target
-
-[Service]
-Type=forking
-PIDFile=/var/run/redis/redis.pid
-ExecStartPre=/bin/mkdir -p /var/run/redis
-ExecStartPre=/bin/chown redis:redis /var/run/redis
-
-ExecStart=/sbin/start-stop-daemon --start --chuid redis:redis --pidfile /var/run/redis/redis.pid --umask 007 --exec /usr/bin/redis-server -- /etc/redis/redis.conf
-ExecReload=/bin/kill -USR2 $MAINPID
-
-[Install]
-WantedBy=multi-user.target

+ 0 - 11
tasks/Ubuntu/redis.yml

@@ -4,19 +4,8 @@
 
   - include_vars: "{{ ansible_distribution }}.yml"
 
-  - name: Ensure the redis APT repo is present
-    apt_repository:
-      repo: "{{ redis_pkg_repo }}"
-      state: present
-      update_cache: true
-
   - name: Ensure redis is installed
     apt:
       name: "{{ redis_pkg_name }}"
       state: "{{ redis_pkg_state }}"
       update_cache: true
-
-  - name: Deploy redis systemd service manifest
-    copy:
-      src: redis_systemd.service
-      dest: /etc/systemd/system/redis.service

+ 1 - 1
vars/Ubuntu.yml

@@ -3,8 +3,8 @@
 # Defaults are defined in vars/default.yml
 
 # redis server properties
-redis_pkg_repo: 'ppa:chris-lea/redis-server'
 redis_pkg_name: redis-server
+redis_service_name: redis-server
 
 # Sensu/Uchiwa user/group/service properties
 sensu_user_name: root