From 687027b2ca854ca7a9e3eb779adcbb4d1c9a5be5 Mon Sep 17 00:00:00 2001 From: Philipp Hossner Date: Tue, 5 Mar 2024 13:51:25 +0000 Subject: [PATCH] Fix hashivault_k8s_auth_role not detecting policy changes --- ansible/modules/hashivault/hashivault_k8s_auth_role.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/modules/hashivault/hashivault_k8s_auth_role.py b/ansible/modules/hashivault/hashivault_k8s_auth_role.py index 0816e6ef2..54dae82c4 100644 --- a/ansible/modules/hashivault/hashivault_k8s_auth_role.py +++ b/ansible/modules/hashivault/hashivault_k8s_auth_role.py @@ -123,6 +123,8 @@ def hashivault_k8s_auth_role(module): current_state['max_ttl'] = current_state['token_max_ttl'] if 'period' not in current_state and 'token_period' in current_state: current_state['period'] = current_state['token_period'] + if 'policies' not in current_state and 'token_policies' in current_state: + current_state['policies'] = current_state['token_policies'] for key in desired_state.keys(): if key in current_state and desired_state[key] != current_state[key]: changed = True