blob: 4f2923722a052a24a0672bd52dcaa6c884a4c22f [file] [log] [blame]
Gary Wuab1a4c92017-08-25 06:46:17 -07001#!/bin/bash
2# This particular environment was created specifically for MultiCloud
3
4# vim: ts=4 sw=4 sts=4 et tw=72 :
5
6# force any errors to cause the script and job to end in failure
7set -xeu -o pipefail
8
9rh_systems() {
10 # memcached
11 yum install -y memcached
12 systemctl enable memcached
13}
14
15ubuntu_systems() {
16 # memcached
17 apt-get install memcached
18}
19
20all_systems() {
21 echo 'No common distribution configuration to perform'
22}
23
24echo "---> Detecting OS"
25ORIGIN=$(facter operatingsystem | tr '[:upper:]' '[:lower:]')
26
27case "${ORIGIN}" in
28 fedora|centos|redhat)
29 echo "---> RH type system detected"
30 rh_systems
31 ;;
32 ubuntu)
33 echo "---> Ubuntu system detected"
34 ubuntu_systems
35 ;;
36 *)
37 echo "---> Unknown operating system"
38 ;;
39esac
40
41# execute steps for all systems
42all_systems