Skip to content

Commit

Permalink
Merge pull request #197 from autn/fix/upgrade-codebase-to-new-ansible…
Browse files Browse the repository at this point in the history
…-and-the-other-packages

Upgrade the codebase after upgrading ansible, and update the packages
  • Loading branch information
YPCrumble committed Nov 2, 2023
2 parents b7860f5 + 6cca793 commit 78a90af
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 21 deletions.
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r requirements.txt

ansible-lint==6.20.3
flake8==3.9.1
ansible-lint==6.21.1
flake8==6.1.0
molecule==5.1.0
molecule-docker==2.1.0
yamllint==1.30.0
yamllint==1.32.0
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ansible==7.4.0
ansible==7.5.0
10 changes: 10 additions & 0 deletions roles/db/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@
type: database
role: "{{ db_user }}"

- name: Grant schema public to the user.
become: true
become_user: postgres
community.postgresql.postgresql_privs:
db: "{{ db_name }}"
privs: ALL
type: schema
objs: public
role: "{{ db_user }}"

- name: Ensure user does not have unnecessary privileges
become: true
become_user: postgres
Expand Down
31 changes: 17 additions & 14 deletions roles/rabbitmq/tasks/setup_users.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
---

- name: Create default admin user
community.rabbitmq.rabbitmq_user: user={{ rabbitmq_admin_user }}
password={{ rabbitmq_admin_password }}
vhost=/
tags=administrator
state=present
community.rabbitmq.rabbitmq_user:
user: "{{ rabbitmq_admin_user }}"
password: "{{ rabbitmq_admin_password }}"
vhost: /
tags: administrator
state: present

- name: Create application user
community.rabbitmq.rabbitmq_user: user={{ rabbitmq_application_user }}
password={{ rabbitmq_application_password }}
vhost={{ rabbitmq_application_vhost }}
configure_priv=.*
read_priv=.*
write_priv=.*
state=present
community.rabbitmq.rabbitmq_user:
user: "{{ rabbitmq_application_user }}"
password: "{{ rabbitmq_application_password }}"
vhost: "{{ rabbitmq_application_vhost }}"
configure_priv: .*
read_priv: .*
write_priv: .*
state: present

- name: Ensure the default 'guest' user doesn't exist
community.rabbitmq.rabbitmq_user: user=guest
state=absent
community.rabbitmq.rabbitmq_user:
user: "guest"
state: absent
2 changes: 1 addition & 1 deletion roles/web/tasks/setup_virtualenv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: Install virtualenv
ansible.builtin.pip:
name: virtualenv
version: 15.1.0
version: 20.24.6
tags: packages

- name: Check if Supervisor exists
Expand Down
4 changes: 2 additions & 2 deletions site.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---

- ansible.builtin.import_tasks: dbservers.yml
- ansible.builtin.import_playbook: dbservers.yml

- ansible.builtin.import_tasks: webservers.yml
- ansible.builtin.import_playbook: webservers.yml

0 comments on commit 78a90af

Please sign in to comment.