summaryrefslogtreecommitdiff
path: root/playbooks
diff options
context:
space:
mode:
authorckonstanski <ckonstanski@pippiandcarlos.com>2017-12-08 17:15:09 +0000
committerckonstanski <ckonstanski@pippiandcarlos.com>2017-12-08 17:15:09 +0000
commit37de0831718e5a4e54210462f501c97394803008 (patch)
treea6e39938d3572f269378e109e0f1a0225fa1060c /playbooks
parent621a5c280a71fe3ede8742b9b289ee0e3d2a9875 (diff)
autocommit Fri Dec 8 17:15:09 UTC 2017
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/openbook.yaml10
-rw-r--r--playbooks/openjdk.yaml4
-rw-r--r--playbooks/stop_start_openbook.yaml15
3 files changed, 24 insertions, 5 deletions
diff --git a/playbooks/openbook.yaml b/playbooks/openbook.yaml
index 3b5f70b..385efd5 100644
--- a/playbooks/openbook.yaml
+++ b/playbooks/openbook.yaml
@@ -153,6 +153,16 @@
runlevel: "{{ item.runlevel }}"
with_items:
- { name: openbook, runlevel: default }
+ when: openbook_install_database|string() == "False"
+
+ - name: "Disable openbook service"
+ service:
+ name: "{{ item.name }}"
+ enabled: no
+ runlevel: "{{ item.runlevel }}"
+ with_items:
+ - { name: openbook, runlevel: default }
+ when: openbook_install_database|string() == "True"
- name: "Stop Openbook"
hosts: "{{ groups['target']|sort(reverse=True) }}"
diff --git a/playbooks/openjdk.yaml b/playbooks/openjdk.yaml
index 00c7d90..676386f 100644
--- a/playbooks/openjdk.yaml
+++ b/playbooks/openjdk.yaml
@@ -13,6 +13,7 @@
state: present
with_items:
- openjdk-8-jdk-headless
+ - ca-certificates-java
when: ansible_distribution == "Ubuntu"
- name: "Update yum cache"
@@ -57,3 +58,6 @@
with_items:
- { regexp: '^securerandom.source=file:/dev/random.*$', line: "securerandom.source=file:/dev/urandom" }
when: ansible_distribution == "Gentoo"
+
+ - name: "Ensure java root certs are packaged"
+ shell: update-ca-certificates
diff --git a/playbooks/stop_start_openbook.yaml b/playbooks/stop_start_openbook.yaml
index 83c1d57..c34a7ff 100644
--- a/playbooks/stop_start_openbook.yaml
+++ b/playbooks/stop_start_openbook.yaml
@@ -2,9 +2,10 @@
- name: "Verify action to take"
hosts: localhost
tasks:
- - name: "Check that -e 'action=[stop|start]' was passed in"
- fail: msg="The variable 'action' was not passed in with a value of 'stop' or 'start' on the command line."
- when: action not in ["stop", "start"]
+ - name: "Check that -e 'action=[stop|start|restart]' was passed in"
+ fail:
+ msg: "The variable 'action' was not passed in with a value of 'stop', 'start' or 'restart' on the command line."
+ when: action not in ["stop", "start", "restart"]
- name: "Stop Openbook"
hosts: "{{ groups['target']|sort(reverse=True) }}"
@@ -17,7 +18,7 @@
docker stop ${cont}
done
docker container prune -f
- when: action == "stop"
+ when: action in ["stop", "restart"]
- name: "Start Openbook"
hosts: "{{ groups['target']|sort }}"
@@ -25,4 +26,8 @@
tasks:
- name: "Start Openbook"
shell: /etc/init.d/openbook start
- when: action == "start"
+ when: action in ["start", "restart"] and extra_args != "debug"
+
+ - name: "Start Openbook in debug mode"
+ shell: /etc/init.d/openbook debug
+ when: action in ["start", "restart"] and extra_args == "debug"