Skip to content

Commit 6bd96c3

Browse files
committed
fix format
1 parent 77349b3 commit 6bd96c3

13 files changed

Lines changed: 31 additions & 24 deletions

File tree

ansible/group_vars/all.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ $ANSIBLE_VAULT;1.1;AES256
44
37383866646666633238393062313336363530626562643164623839393435303930656336666135
55
3064646536313338380a623562363263613537666333313562613737393239366366373064386665
66
3963
7+

ansible/playbooks/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Deploy application
33
hosts: webservers
4-
become: yes
4+
become: true
55
roles:
6-
- web_app
6+
- web_app

ansible/playbooks/provision.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
- name: Provision web servers
33
hosts: webservers
4-
become: yes
4+
become: true
55
roles:
66
- common
7-
- docker
7+
- docker

ansible/roles/common/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ common_packages:
99
- tree
1010

1111
common_create_app_user: false
12-
common_user: appuser
12+
common_user: appuser

ansible/roles/common/tasks/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
rescue:
2222
- name: Fix apt if update failed
23+
ansible.builtin.apt:
24+
update_cache: true
25+
cache_valid_time: 0
2326
when: ansible_os_family == "Debian"
24-
ansible.builtin.command: apt-get update --fix-missing
25-
changed_when: false
2627

2728
always:
2829
- name: Log completion
@@ -41,4 +42,4 @@
4142
name: "{{ common_user | default('appuser') }}"
4243
state: present
4344
groups: sudo
44-
shell: /bin/bash
45+
shell: /bin/bash

ansible/roles/docker/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ docker_packages:
77
- docker-compose-plugin
88

99
docker_user: ubuntu
10-
docker_custom_config: false
10+
docker_custom_config: false
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: restart docker
2+
- name: Restart docker
33
ansible.builtin.service:
44
name: docker
5-
state: restarted
5+
state: restarted

ansible/roles/docker/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@
6060
src: daemon.json.j2
6161
dest: /etc/docker/daemon.json
6262
mode: '0644'
63-
notify: restart docker
63+
notify: restart docker

ansible/roles/web_app/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ web_app_restart_policy: unless-stopped
88
web_app_compose_project_dir: "/opt/{{ web_app_name }}"
99
web_app_docker_compose_version: "3.8"
1010
web_app_wipe: false
11-
web_app_env_vars: {}
11+
web_app_env_vars: {}
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
2-
- name: restart app
3-
community.docker.docker_compose_v2:
4-
project_src: "{{ web_app_compose_project_dir }}"
5-
state: present
6-
pull: always
7-
remove_orphans: true
2+
- name: Restart app
3+
ansible.builtin.service:
4+
name: "{{ web_app_name }}"
5+
state: restarted

0 commit comments

Comments
 (0)