From 947656f9c4c692dc98ab041beb6e352069076c6c Mon Sep 17 00:00:00 2001 From: Chris Croome <chris@webarchitects.co.uk> Date: Mon, 3 Mar 2025 14:25:39 +0000 Subject: [PATCH] fix conf template --- .pre-commit-config.yaml | 2 +- tasks/instance_present.yml | 2 +- templates/valkey.conf.j2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index afaf100..13a5e36 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: - README.md # https://github.com/ansible/ansible-lint/releases - repo: https://github.com/ansible/ansible-lint.git - rev: v25.1.2 + rev: v25.1.3 hooks: - id: ansible-lint name: Ansible Lint diff --git a/tasks/instance_present.yml b/tasks/instance_present.yml index 926bd85..720be22 100644 --- a/tasks/instance_present.yml +++ b/tasks/instance_present.yml @@ -134,7 +134,7 @@ owner: valkey group: valkey mode: "0600" - # diff: false + diff: false register: valkey_instance_config_templated - name: Debug valkey_instance_config_templated diff --git a/templates/valkey.conf.j2 b/templates/valkey.conf.j2 index b5a4eba..c8ce65c 100644 --- a/templates/valkey.conf.j2 +++ b/templates/valkey.conf.j2 @@ -10,7 +10,7 @@ {# Config loop, turn the dictionary into a key, value list #} {% for valkey_var_pair in valkey_instance.config | ansible.builtin.dict2items %} {# If the value is a list repeat the key for each list item #} -{% if valkey_var_pair | ansible.builtin.type_debug == "list" %} +{% if valkey_var_pair.value | ansible.builtin.type_debug == "list" %} {% for valkey_var_pair_value in valkey_var_pair.value %} {# If the value is a boolean use yes or no as values #} {% if valkey_var_pair.value | ansible.builtin.type_debug == "bool" %} -- GitLab