1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-10 22:15:05 +00:00

[PR #10891/5f471b8e backport][stable-11] refactor dict from literal list (#10895)

refactor dict from literal list (#10891)

* refactor dict from literal list

* add changelog frag

(cherry picked from commit 5f471b8e5b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2025-10-10 19:15:49 +02:00 committed by GitHub
parent 8685d12996
commit 32438bdf80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 17 additions and 14 deletions

View file

@ -183,8 +183,8 @@ class PacemakerStonith(StateModuleHelper):
def fmt_stonith_operations(self):
modified_stonith_operations = []
for stonith_operation in self.vars.stonith_operations:
modified_stonith_operations.append(dict([("operation_action", stonith_operation.get('operation_action')),
("operation_option", stonith_operation.get('operation_options'))]))
modified_stonith_operations.append(dict(operation_action=stonith_operation.get('operation_action'),
operation_option=stonith_operation.get('operation_options')))
return modified_stonith_operations
def state_absent(self):