Allow sourcing apt_key from ansible host

This change allows deployers to specify locally sourced apt keys
on the ansible host rather than requiring all apt keys to be
downloaded from upstream keyservers.

The current implementation requires that all containers and hosts
we deploy to have an internet connection to download apt keys for
the various repos. This change allows the user to source apt keys
from the deployment host like for example:

ceph_gpg_keys:
  - key_name: 'ceph'
    data: "{{ lookup('file', '/etc/openstack_deploy/keys/ceph.gpg') }}"
    hash_id: '0xe84ac2c0460f3994'

Note: Deployers can already set the repo URLs to use local sources,
so this enables fully offline package installation.

Change-Id: I1607c7a5c9bb4d5e06dedbc76c84a77014305df2
This commit is contained in:
Logan V
2016-01-14 12:46:57 -06:00
parent c6cb482865
commit 41241e9691
2 changed files with 4 additions and 2 deletions

View File

@@ -25,7 +25,8 @@
- name: Add ceph apt-keys
apt_key:
id: "{{ item.hash_id }}"
keyserver: "{{ item.keyserver }}"
keyserver: "{{ item.keyserver | default(omit) }}"
data: "{{ item.data | default(omit) }}"
state: "present"
register: add_keys
until: add_keys|success

View File

@@ -39,7 +39,8 @@
- name: Add haproxy apt-keys
apt_key:
id: "{{ item.hash_id }}"
keyserver: "{{ item.keyserver }}"
keyserver: "{{ item.keyserver | default(omit) }}"
data: "{{ item.data | default(omit) }}"
state: "present"
register: add_keys
until: add_keys|success