From 37de0831718e5a4e54210462f501c97394803008 Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Fri, 8 Dec 2017 17:15:09 +0000 Subject: autocommit Fri Dec 8 17:15:09 UTC 2017 --- playbooks/openbook.yaml | 10 ++++++++++ playbooks/openjdk.yaml | 4 ++++ playbooks/stop_start_openbook.yaml | 15 ++++++++++----- 3 files changed, 24 insertions(+), 5 deletions(-) (limited to 'playbooks') 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" -- cgit v1.3