Skip to content

Commit

Permalink
Merge pull request #12 from Apreche/update_fix
Browse files Browse the repository at this point in the history
Update all system packages to latest versions on deployment. Make sure
  • Loading branch information
Scott Rubin authored Jul 26, 2021
2 parents 1033cc0 + c5d0b66 commit c9f0971
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/cache/tasks/install_memcached.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Install memcached
ansible.builtin.apt:
name: memcached
state: present
state: latest
update_cache: yes
become: yes

Expand Down
1 change: 1 addition & 0 deletions ansible/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
- include_tasks: upgrade.yml
- include_tasks: register_vars.yml
- include_tasks: make_dirs.yml
- include_tasks: deploy_key.yml
Expand Down
13 changes: 13 additions & 0 deletions ansible/roles/common/tasks/upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Update System Packages
ansible.builtin.apt:
upgrade: dist
update_cache: yes
become: yes

- name: Install acl
ansible.builtin.apt:
name: acl
state: latest
become: yes
...
1 change: 1 addition & 0 deletions ansible/roles/db/tasks/configure_postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
pkg:
- libpq-dev
- python3-psycopg2
state: latest
become: yes

- name: Create PostgreSQL database
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/db/tasks/install_postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- name: Install PostgreSQL
ansible.builtin.apt:
name: postgresql
state: latest
update_cache: yes
become: yes

Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/postfix/tasks/local_only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

- name: Install postfix
ansible.builtin.apt:
pkg:
- postfix
name: postfix
state: latest
become: yes
...
2 changes: 2 additions & 0 deletions ansible/roles/python/tasks/install_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- python3-pip
- python3-setuptools
- python3-venv
state: latest
become: yes

- name: Set python3 as default
Expand All @@ -39,6 +40,7 @@
- tk-dev
- python3-tk
- zlib1g-dev
state: latest
become: yes

- name: Upgrade pip using pip
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/queue/tasks/install_rabbitmq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Install rabbitmq
ansible.builtin.apt:
name: rabbitmq-server
state: present
state: latest
update_cache: yes
become: yes

Expand Down
3 changes: 1 addition & 2 deletions ansible/roles/web/tasks/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
- name: Install NGINX
ansible.builtin.apt:
name: "nginx"
state: present
update_cache: yes
state: latest
become: yes

- name: Ensure NGINX is started
Expand Down

0 comments on commit c9f0971

Please sign in to comment.