From 80722d9ac430f27d4445fc5e9b9f1727800c0cfc Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Sat, 4 May 2024 21:56:33 -0600 Subject: [PATCH] Refactor hostgroup parameter name --- README.md | 3 ++- playbooks/deploy.yml | 2 +- playbooks/vars/main.yml | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0a7841d..59c90e4 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ An [ansible collection](https://galaxy.ansible.com/ui/repo/published/nephelaiio/ | Hostgroup | Default | Description | |:-------------------------|---------------------:|:---------------------------------| -| consul_group | 'consul' | Consul cluster members | +| consul_group_name | 'consul' | Consul cluster members | | consul_update_skip_group | 'consul_update_skip' | Consul cluster update skip hosts | ## Collection variables @@ -28,6 +28,7 @@ Cluster wide parameters | consul_backup_minutes | '\*/5' | Consul snapshot cronjob component | false | | consul_backup_hours | '\*' | Consul snapshot cronjob component | false | | consul_backup_days | '\*' | Consul snapshot cronjob component | false | +| consul_group | 'consul | Consul OS group | false | | consul_role | 'server' | Consul node role, one of ['server', client] | false | ## Collection playbooks diff --git a/playbooks/deploy.yml b/playbooks/deploy.yml index 9e2c731..453ba2a 100644 --- a/playbooks/deploy.yml +++ b/playbooks/deploy.yml @@ -85,7 +85,7 @@ path: "{{ _consul_backup_path }}" state: directory owner: consul - group: consul + group: "{{ _consul_group }}" mode: 0740 - name: Create Consul backup script diff --git a/playbooks/vars/main.yml b/playbooks/vars/main.yml index 112a29d..479fba5 100644 --- a/playbooks/vars/main.yml +++ b/playbooks/vars/main.yml @@ -1,5 +1,5 @@ --- -_consul_hostgroup: "{{ consul_group | default('consul') }}" +_consul_hostgroup: "{{ consul_group_name | default('consul') }}" _consul_update_skip_hostgroup: "{{ consul_update_skip_group | default('consul_update_skip') }}" _consul_release: "{{ consul_release | default('1.18.1-1') }}" _consul_release_package: "{{ _consul_release }}" @@ -15,3 +15,4 @@ _consul_backup_bin: "{{ consul_backup_bin | default('/usr/local/bin/consul-backu _consul_restore_bin: "{{ consul_backup_bin | default('/usr/local/bin/consul-restore') }}" _consul_install_from_repo: "{{ (consul_install_from_repo | default(False)) | bool }}" _consul_role: "{{ consul_role | default('server') }}" +_consul_group: "{{ consul_group | default('consul') }}"