aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-08-14 12:02:16 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-08-14 12:08:04 +0200
commit84066b29e322591ade980cb72e55c88b98d144c4 (patch)
treebb3c7e482f46156385c967c39d495f6a3867ef54
parentletsencrypt: fix manual token prompts (diff)
downloadinfra-ansible-84066b29e322591ade980cb72e55c88b98d144c4.tar.gz
infra-ansible-84066b29e322591ade980cb72e55c88b98d144c4.zip
update task names & add more logging
-rw-r--r--roles/digitalocean_volume/tasks/main.yml4
-rw-r--r--roles/file_wait/tasks/check.yml12
-rw-r--r--roles/file_wait/tasks/main.yml4
-rw-r--r--roles/journald/tasks/main.yml2
-rw-r--r--roles/router/tasks/main.yml2
-rw-r--r--roles/systemd_edit/tasks/main.yml4
-rw-r--r--roles/systemd_requires_mounts_for/tasks/main.yml2
-rw-r--r--roles/wireguard/tasks/main.yml2
-rw-r--r--roles/workspace/tasks/main.yml2
9 files changed, 19 insertions, 15 deletions
diff --git a/roles/digitalocean_volume/tasks/main.yml b/roles/digitalocean_volume/tasks/main.yml
index 57ca0e2..c23da76 100644
--- a/roles/digitalocean_volume/tasks/main.yml
+++ b/roles/digitalocean_volume/tasks/main.yml
@@ -1,8 +1,8 @@
-- name: Default mount path
+- name: Set default mount point
ansible.builtin.set_fact:
volume_dir: "{{ volume_dir | default('/mnt/{{ volume_name }}') }}"
-- name: Mount volume
+- name: 'Mount volume: {{ volume_name }}'
become: true
ansible.posix.mount:
path: '{{ volume_dir }}'
diff --git a/roles/file_wait/tasks/check.yml b/roles/file_wait/tasks/check.yml
index aba500b..aa55830 100644
--- a/roles/file_wait/tasks/check.yml
+++ b/roles/file_wait/tasks/check.yml
@@ -2,7 +2,7 @@
ansible.builtin.wait_for_connection:
timeout: '{{ file_wait_seconds }}'
-- name: Check if the file exists
+- name: Check if file exists
ansible.builtin.file:
path: '{{ file_wait_path }}'
state: file
@@ -16,10 +16,14 @@
- name: If the host restarted, try again
when: file_wait_check is unreachable
block:
- - name: Note a reboot happened
+ - name: Log the number of tolerable reboots
+ ansible.builtin.debug:
+ msg: 'Number of tolerable reboots: {{ file_wait_reboots }}'
+
+ - name: Decrement the number of tolerable reboots
ansible.builtin.set_fact:
file_wait_reboots: '{{ (file_wait_reboots | int) - 1 }}'
- - name: Retry if there're more attempts
+ - name: Retry if there're more tolerable reboots
ansible.builtin.include_tasks: check.yml
- when: (file_wait_reboots | int > 0)
+ when: (file_wait_reboots | int >= 0)
diff --git a/roles/file_wait/tasks/main.yml b/roles/file_wait/tasks/main.yml
index 76dce68..9afef57 100644
--- a/roles/file_wait/tasks/main.yml
+++ b/roles/file_wait/tasks/main.yml
@@ -1,7 +1,7 @@
-- name: Checking if the file exists
+- name: Check if file exists
ansible.builtin.include_tasks: check.yml
-- name: Fail unless the file exists
+- name: Fail unless file exists
ansible.builtin.fail:
msg: 'File is missing: {{ file_wait_path }}'
when: file_wait_check is not defined or file_wait_check is not succeeded or file_wait_check is unreachable
diff --git a/roles/journald/tasks/main.yml b/roles/journald/tasks/main.yml
index 9b0317b..53e3393 100644
--- a/roles/journald/tasks/main.yml
+++ b/roles/journald/tasks/main.yml
@@ -1,4 +1,4 @@
-- name: Less noisy journal
+- name: Make journald less noisy
become: true
block:
- name: Edit journald.conf
diff --git a/roles/router/tasks/main.yml b/roles/router/tasks/main.yml
index 6aecdd4..476afb5 100644
--- a/roles/router/tasks/main.yml
+++ b/roles/router/tasks/main.yml
@@ -1,4 +1,4 @@
-- name: Set sysctl values
+- name: Enable traffic forwarding
become: true
ansible.posix.sysctl:
name: '{{ item }}'
diff --git a/roles/systemd_edit/tasks/main.yml b/roles/systemd_edit/tasks/main.yml
index 8a08e6d..98dbd27 100644
--- a/roles/systemd_edit/tasks/main.yml
+++ b/roles/systemd_edit/tasks/main.yml
@@ -1,4 +1,4 @@
-- name: Edit systemd service definition
+- name: Edit systemd service
become: true
block:
- name: 'Create override directory: {{ service_name }}'
@@ -9,7 +9,7 @@
group: root
mode: '755'
- - name: 'Set up override: {{ service_name }}'
+ - name: 'Set up override.conf: {{ service_name }}'
community.general.ini_file:
dest: '/etc/systemd/system/{{ service_name }}.service.d/override.conf'
section: '{{ service_section }}'
diff --git a/roles/systemd_requires_mounts_for/tasks/main.yml b/roles/systemd_requires_mounts_for/tasks/main.yml
index c7b7542..4459d59 100644
--- a/roles/systemd_requires_mounts_for/tasks/main.yml
+++ b/roles/systemd_requires_mounts_for/tasks/main.yml
@@ -1,4 +1,4 @@
-- name: Set up a service to require a mounted directory
+- name: Edit systemd service
ansible.builtin.include_role:
name: systemd_edit
vars:
diff --git a/roles/wireguard/tasks/main.yml b/roles/wireguard/tasks/main.yml
index f1eb310..b91ad8a 100644
--- a/roles/wireguard/tasks/main.yml
+++ b/roles/wireguard/tasks/main.yml
@@ -7,7 +7,7 @@
name: wireguard-tools
state: present
- - name: Config file
+ - name: Write wg-quick config file
ansible.builtin.template:
src: wg0.conf
dest: '/etc/wireguard/{{ wg_name }}.conf'
diff --git a/roles/workspace/tasks/main.yml b/roles/workspace/tasks/main.yml
index 2905ad7..179bdef 100644
--- a/roles/workspace/tasks/main.yml
+++ b/roles/workspace/tasks/main.yml
@@ -1,4 +1,4 @@
-- name: Workspace directory
+- name: Create workspace directory
become: true
ansible.builtin.file:
path: '{{ workspace_dir }}'