Skip to content

Commit

Permalink
Update to fix issue with service module.
Browse files Browse the repository at this point in the history
  • Loading branch information
YPCrumble committed Jul 5, 2021
1 parent c1a4878 commit 5ef97c5
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 6 deletions.
9 changes: 8 additions & 1 deletion roles/celery/tasks/setup_supervisor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
---

- name: Ensure the Supervisor service is running
service: name=supervisor state=started enabled=yes
service:
name: supervisor
state: started
enabled: yes
# TODO: This is likely due to a bug in Ansible.
# Remove this line in the future.
# See https://github.com/ansible/ansible/issues/75005
use: sysvinit

- name: Create the Supervisor config file for {{ celery_application_name }}
template: src=supervisor_{{ celery_application_name }}.conf.j2
Expand Down
9 changes: 8 additions & 1 deletion roles/db/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
tags: packages

- name: Ensure the PostgreSQL service is running
service: name=postgresql state=started enabled=yes
service:
name: postgresql
state: started
enabled: yes
# TODO: This is likely due to a bug in Ansible.
# Remove this line in the future.
# See https://github.com/ansible/ansible/issues/75005
use: sysvinit

- name: Ensure database is created
become: true
Expand Down
9 changes: 8 additions & 1 deletion roles/memcached/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,11 @@
- restart memcached

- name: Ensure the Memcached service is running
service: name=memcached state=started enabled=yes
service:
name: memcached
state: started
enabled: yes
# TODO: This is likely due to a bug in Ansible.
# Remove this line in the future.
# See https://github.com/ansible/ansible/issues/75005
use: sysvinit
9 changes: 8 additions & 1 deletion roles/nginx/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,11 @@
notify: reload nginx

- name: Ensure Nginx service is started
service: name=nginx state=started enabled=yes
service:
name: nginx
state: started
enabled: yes
# TODO: This is likely due to a bug in Ansible.
# Remove this line in the future.
# See https://github.com/ansible/ansible/issues/75005
use: sysvinit
4 changes: 3 additions & 1 deletion roles/rabbitmq/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---

- name: restart rabbitmq-server
service: name=rabbitmq-server state=restarted
service:
name: rabbitmq-server
state: restarted
4 changes: 4 additions & 0 deletions roles/rabbitmq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
name: rabbitmq-server
state: started
enabled: true
# TODO: This is likely due to a bug in Ansible.
# Remove this line in the future.
# See https://github.com/ansible/ansible/issues/75005
use: sysvinit

- name: Enable the RabbitMQ Management Console
rabbitmq_plugin: names=rabbitmq_management state=enabled
Expand Down
9 changes: 8 additions & 1 deletion roles/web/tasks/setup_supervisor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
---

- name: Ensure the Supervisor service is running
service: name=supervisor state=started enabled=yes
service:
name: supervisor
state: started
enabled: yes
# TODO: This is likely due to a bug in Ansible.
# Remove this line in the future.
# See https://github.com/ansible/ansible/issues/75005
use: sysvinit

- name: Create the Supervisor config file
template: src=supervisor_config.j2
Expand Down

0 comments on commit 5ef97c5

Please sign in to comment.