Make sure the ARA systemd service is not running with apache
apache with mod_wsgi takes care of starting the app. If the role is first ran with the defaults, the ara systemd service will be running. If we re-run the role and choose an apache deployment, we need to make sure we're disabling it. What this boils down to -- let's always set up the systemd service but start it or disable it according to what we need to deploy. Change-Id: I8fceed417d766a28564ad88a972de4f38c1b44ac
This commit is contained in:
parent
b526ed4c9a
commit
49bd5e1afa
|
@ -40,4 +40,4 @@
|
||||||
name: ara
|
name: ara
|
||||||
state: restarted
|
state: restarted
|
||||||
when: ara.deployment.server == 'embedded' or
|
when: ara.deployment.server == 'embedded' or
|
||||||
ara.deployment.server == 'nginx' and ara.deployment.type == 'embedded_proxy'
|
ara.deployment.server == 'nginx' and ara.deployment.type == 'embedded_proxy'
|
||||||
|
|
|
@ -16,6 +16,14 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
|
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
- name: Ensure the embedded server service is not started and is disabled
|
||||||
|
become: true
|
||||||
|
systemd:
|
||||||
|
name: ara
|
||||||
|
state: stopped
|
||||||
|
enabled: no
|
||||||
|
masked: yes
|
||||||
|
|
||||||
- name: Install required dependencies for mod_wsgi
|
- name: Install required dependencies for mod_wsgi
|
||||||
become: true
|
become: true
|
||||||
package:
|
package:
|
||||||
|
|
|
@ -16,28 +16,6 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
|
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
- name: Get the location of ara-manage
|
|
||||||
command: which ara-manage
|
|
||||||
environment:
|
|
||||||
PATH: "{{ path_with_virtualenv | default(omit) }}"
|
|
||||||
register: ara_manage
|
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- name: Copy systemd service template
|
|
||||||
become: true
|
|
||||||
template:
|
|
||||||
src: templates/ara_service.conf.j2
|
|
||||||
dest: /etc/systemd/system/ara.service
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0644
|
|
||||||
notify:
|
|
||||||
- reload systemctl daemon
|
|
||||||
- restart ara
|
|
||||||
|
|
||||||
- name: Flush handlers
|
|
||||||
meta: flush_handlers
|
|
||||||
|
|
||||||
- name: Ensure the embedded server service is started and enabled
|
- name: Ensure the embedded server service is started and enabled
|
||||||
become: true
|
become: true
|
||||||
systemd:
|
systemd:
|
||||||
|
|
|
@ -89,6 +89,28 @@
|
||||||
src: logrotate.conf.j2
|
src: logrotate.conf.j2
|
||||||
dest: /etc/logrotate.d/ara
|
dest: /etc/logrotate.d/ara
|
||||||
|
|
||||||
|
- name: Get the location of ara-manage
|
||||||
|
command: which ara-manage
|
||||||
|
environment:
|
||||||
|
PATH: "{{ path_with_virtualenv | default(omit) }}"
|
||||||
|
register: ara_manage
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Copy systemd service template
|
||||||
|
become: true
|
||||||
|
template:
|
||||||
|
src: templates/ara_service.conf.j2
|
||||||
|
dest: /etc/systemd/system/ara.service
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
notify:
|
||||||
|
- reload systemctl daemon
|
||||||
|
- restart ara
|
||||||
|
|
||||||
|
- name: Flush handlers
|
||||||
|
meta: flush_handlers
|
||||||
|
|
||||||
- name: Include web server configuration
|
- name: Include web server configuration
|
||||||
include_tasks: "{{ ara.deployment.server }}/{{ ara.deployment.type }}.yml"
|
include_tasks: "{{ ara.deployment.server }}/{{ ara.deployment.type }}.yml"
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
ara: "{{ ara | combine(override, recursive=true) }}"
|
ara: "{{ ara | combine(override, recursive=true) }}"
|
||||||
|
|
||||||
- name: Install the embedded server service
|
- name: Ensure the embedded server service is running
|
||||||
include_tasks: ../embedded/standalone.yml
|
include_tasks: ../embedded/standalone.yml
|
||||||
|
|
||||||
- name: Set selinux boolean to allow nginx to reverse proxy
|
- name: Set selinux boolean to allow nginx to reverse proxy
|
||||||
|
|
Loading…
Reference in New Issue