Skip to content

Commit

Permalink
Merge pull request #184 from YPCrumble/feature/upgrade-molecule
Browse files Browse the repository at this point in the history
Upgrade Molecule to v3.3.4.
  • Loading branch information
YPCrumble committed Jul 5, 2021
2 parents 7dd9370 + 5ef97c5 commit 92437b3
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 20 deletions.
File renamed without changes.
6 changes: 2 additions & 4 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
yamllint .
platforms:
- name: instance-xenial
image: ubuntu
Expand All @@ -20,8 +20,6 @@ provisioner:
name: ansible-lint
env:
ANSIBLE_ROLES_PATH: ../../roles/
scenario:
name: default
verifier:
name: testinfra
lint:
Expand Down
6 changes: 4 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
-r requirements.txt

docker==3.6.0
molecule==2.22.0
molecule==3.3.4
molecule-docker==0.2.4
testinfra==3.2.1
yamllint==1.19.0
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ansible==2.9.20
ansible==4.2.0
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
15 changes: 8 additions & 7 deletions roles/rabbitmq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,20 @@
tags:
- packages

- name: Enable the RabbitMQ Management Console
rabbitmq_plugin: names=rabbitmq_management state=enabled
notify: restart rabbitmq-server

- name: Make sure rabbitmq-server is enabled and running
service:
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
notify: restart rabbitmq-server

- include: setup_vhosts.yml

- include: setup_users.yml

- name: Ensure that the RabbitMQ service is running
service: name=rabbitmq-server state=started enabled=yes
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 92437b3

Please sign in to comment.