Skip to content

Commit 418df8c

Browse files
committed
update lint
1 parent c6884c3 commit 418df8c

File tree

9 files changed

+19
-15
lines changed

9 files changed

+19
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ credentials
3737
*.retry
3838
.vault_pass
3939
ansible/group_vars/all.yml
40+
ansible/group_vars/*.bak
4041
ansible/inventory/*.pyc
4142
__pycache__/

ansible/.ansible-lint

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
skip_list:
3+
- key-order
4+
- var-naming

ansible/playbooks/deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@
1010
register: deploy_local_group_vars
1111
delegate_to: localhost
1212
become: false
13-
run_once: true
1413

1514
- name: Load local vaulted variables when available
1615
ansible.builtin.include_vars:
1716
file: "{{ playbook_dir }}/../group_vars/all.yml"
1817
when: deploy_local_group_vars.stat.exists
19-
run_once: true
2018

2119
roles:
2220
- role: web_app

ansible/playbooks/site.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
---
2-
- import_playbook: provision.yml
3-
- import_playbook: deploy.yml
2+
- name: Run Provision Playbook
3+
import_playbook: provision.yml
4+
5+
- name: Run Deploy Playbook
6+
import_playbook: deploy.yml

ansible/roles/common/tasks/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@
2121
- name: Set timezone
2222
ansible.builtin.command: "timedatectl set-timezone {{ common_timezone }}"
2323
when: common_current_timezone.stdout != common_timezone
24+
changed_when: true
2425
rescue:
2526
- name: Recover apt metadata after failed package preparation
26-
ansible.builtin.command: apt-get update --fix-missing
27+
ansible.builtin.apt:
28+
update_cache: true
29+
force_apt_get: true
2730
changed_when: false
2831

2932
- name: Retry apt cache update after recovery
Lines changed: 1 addition & 1 deletion
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
55
state: restarted

ansible/roles/docker/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
url: "{{ docker_gpg_key_url }}"
2525
dest: "{{ docker_apt_keyring_file }}"
2626
mode: "0644"
27-
notify: restart docker
27+
notify: Restart docker
2828

2929
- name: Add Docker apt repository
3030
ansible.builtin.apt_repository:
@@ -35,15 +35,15 @@
3535
{{ docker_apt_release }} stable
3636
state: present
3737
filename: docker
38-
notify: restart docker
38+
notify: Restart docker
3939

4040
- name: Install Docker packages
4141
ansible.builtin.apt:
4242
name: "{{ docker_packages }}"
4343
state: present
4444
update_cache: true
4545
lock_timeout: 600
46-
notify: restart docker
46+
notify: Restart docker
4747
rescue:
4848
- name: Wait before retrying Docker apt metadata updates
4949
ansible.builtin.pause:

ansible/roles/web_app/handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: restart web application
2+
- name: Restart web application
33
community.docker.docker_compose_v2:
44
project_src: "{{ compose_project_dir }}"
55
state: present

ansible/roles/web_app/tasks/wipe.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
state: absent
1515
when: web_app_compose_file.stat.exists
1616
become: true
17-
ignore_errors: true
1817

1918
- name: Optionally remove application image
2019
community.docker.docker_image:
@@ -23,29 +22,25 @@
2322
force_absent: true
2423
when: web_app_remove_image | bool
2524
become: true
26-
ignore_errors: true
2725

2826
- name: Remove legacy container with the same name
2927
community.docker.docker_container:
3028
name: "{{ app_name }}"
3129
state: absent
3230
force_kill: true
3331
become: true
34-
ignore_errors: true
3532

3633
- name: Remove docker-compose file
3734
ansible.builtin.file:
3835
path: "{{ compose_project_dir }}/docker-compose.yml"
3936
state: absent
4037
become: true
41-
ignore_errors: true
4238

4339
- name: Remove application directory
4440
ansible.builtin.file:
4541
path: "{{ compose_project_dir }}"
4642
state: absent
4743
become: true
48-
ignore_errors: true
4944

5045
- name: Confirm wipe completion
5146
ansible.builtin.debug:

0 commit comments

Comments
 (0)