Merge "Add fallback keyserver capability to galera apt-key tasks"
This commit is contained in:
commit
059dd23532
@ -19,7 +19,10 @@ galera_root_user: root
|
||||
|
||||
# Galera GPG Keys
|
||||
galera_client_gpg_keys:
|
||||
- { key_name: 'mariadb', keyserver: 'hkp://keyserver.ubuntu.com:80', hash_id: '0xcbcb082a1bb943db' }
|
||||
- key_name: 'mariadb'
|
||||
keyserver: 'hkp://keyserver.ubuntu.com:80'
|
||||
fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80'
|
||||
hash_id: '0xcbcb082a1bb943db'
|
||||
|
||||
# Repositories
|
||||
galera_client_apt_repos:
|
||||
|
@ -19,12 +19,26 @@
|
||||
keyserver: "{{ item.keyserver }}"
|
||||
state: "present"
|
||||
with_items: galera_client_gpg_keys
|
||||
register: add_repos
|
||||
until: add_repos|success
|
||||
register: add_keys
|
||||
until: add_keys|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
tags:
|
||||
- galera-client-gpg-keys
|
||||
- galera-client-apt-keys
|
||||
|
||||
- name: Add galera apt-keys using fallback keyserver
|
||||
apt_key:
|
||||
id: "{{ item.hash_id }}"
|
||||
keyserver: "{{ item.fallback_keyserver }}"
|
||||
state: "present"
|
||||
register: add_keys_fallback
|
||||
until: add_keys_fallback|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: galera_client_gpg_keys
|
||||
when: add_keys|failed and item.fallback_keyserver is defined
|
||||
tags:
|
||||
- galera-client-apt-keys
|
||||
|
||||
- name: Add galera repo(s)
|
||||
apt_repository:
|
||||
|
@ -46,7 +46,10 @@ galera_wsrep_debug: 0
|
||||
|
||||
# Galera GPG Keys
|
||||
galera_gpg_keys:
|
||||
- { key_name: 'mariadb', keyserver: 'hkp://keyserver.ubuntu.com:80', hash_id: '0xcbcb082a1bb943db' }
|
||||
- key_name: 'mariadb'
|
||||
keyserver: 'hkp://keyserver.ubuntu.com:80'
|
||||
fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80'
|
||||
hash_id: '0xcbcb082a1bb943db'
|
||||
|
||||
# Repositories
|
||||
galera_apt_repos:
|
||||
|
@ -32,14 +32,29 @@
|
||||
id: "{{ item.hash_id }}"
|
||||
keyserver: "{{ item.keyserver }}"
|
||||
state: "present"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
register: add_keys
|
||||
until: add_keys|success
|
||||
ignore_errors: True
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: galera_gpg_keys
|
||||
tags:
|
||||
- galera-apt-keys
|
||||
|
||||
- name: Add galera apt-keys using fallback keyserver
|
||||
apt_key:
|
||||
id: "{{ item.hash_id }}"
|
||||
keyserver: "{{ item.fallback_keyserver }}"
|
||||
state: "present"
|
||||
register: add_keys_fallback
|
||||
until: add_keys_fallback|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: galera_gpg_keys
|
||||
when: add_keys|failed and item.fallback_keyserver is defined
|
||||
tags:
|
||||
- galera-apt-keys
|
||||
|
||||
- name: Add galera repo(s)
|
||||
apt_repository:
|
||||
repo: "{{ item.repo }}"
|
||||
|
Loading…
Reference in New Issue
Block a user