Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install gpg before calling apt_key #305

Merged
merged 5 commits into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions roles/StackStorm.mongodb/tasks/mongodb_debian.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
---
# gpg is required for apt_key and may be missing in some minimal installations
- name: apt | Install gpg
become: yes
apt:
name: gpg
state: present
update_cache: yes
cache_valid_time: 3600
register: _task
retries: 5
delay: 3
until: _task is succeeded

- name: apt | Add mongodb key
become: yes
apt_key:
Expand Down
2 changes: 1 addition & 1 deletion roles/StackStorm.st2/tasks/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Injecting 'st2_services' var in the middle of play verified to work with 'restart st2' handler as handlers flushed as last step
- name: Redefine list of services based on st2 version
set_fact:
st2_services: "{{ st2_services }} + {{ item.1 }}"
st2_services: "{{ st2_services + item.1 }}"
# dict2items not available until 2.6, so use Jinja's dictsort instead
loop: "{{ st2_services_versioned | dictsort }}"
when: item.0 is version_compare(st2_version_installed, '<=')