Skip to content

Commit

Permalink
Work around ansible-core bug. (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein authored Feb 26, 2025
1 parent 96bb8d3 commit eebfe8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/224-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- "install role - ``sops_install_on_localhost=false`` was not working properly if the role was running on more than one host due to a bug in ansible-core
(https://github.com/ansible-collections/community.sops/issues/223, https://github.com/ansible-collections/community.sops/pull/224)."
6 changes: 3 additions & 3 deletions roles/install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
allow_downgrade: '{{ true if _community_sops_install_allow_downgrade and sops_version != "latest" else omit }}'
become: '{{ sops_become_on_install }}'
delegate_to: '{{ "localhost" if sops_install_on_localhost else omit }}'
run_once: '{{ sops_install_on_localhost or omit }}'
run_once: '{{ sops_install_on_localhost }}'
when: _community_sops_install_system_packages_actual | length > 0

- name: Install unsigned system packages
Expand All @@ -83,7 +83,7 @@
disable_gpg_check: true
become: '{{ sops_become_on_install }}'
delegate_to: '{{ "localhost" if sops_install_on_localhost else omit }}'
run_once: '{{ sops_install_on_localhost or omit }}'
run_once: '{{ sops_install_on_localhost }}'
when: _community_sops_install_system_packages_unsigned_actual | length > 0

- name: Install packages from URL/path (Debian)
Expand All @@ -92,7 +92,7 @@
allow_downgrade: '{{ true if _community_sops_install_allow_downgrade and sops_version != "latest" else omit }}'
become: '{{ sops_become_on_install }}'
delegate_to: '{{ "localhost" if sops_install_on_localhost else omit }}'
run_once: '{{ sops_install_on_localhost or omit }}'
run_once: '{{ sops_install_on_localhost }}'
when: _community_sops_install_system_package_deb_actual is string

- name: Set results
Expand Down

0 comments on commit eebfe8f

Please sign in to comment.