
In preparation for Swift global cluster we need a solution that moves away from a centralised "memcache" server as a distribution mechanism, since we can't guarantee that all swift hosts will have access to one memcache server. This patch uses ansible variables (which were already being set) as the distribution mechanism so that the authorized_keys file can be generated by using the ansible variables set for each host as part of the tasks. Additionally this moves away from using "shell" commands to generate the key and adjust the authorized_keys file and instead uses the built in ansible "authorized_keys" module as well as the built in "generate_ssh_key" option for the "user" module. Finally this adds a "swift_recreate_keys" option which can be set to "True" in order to recreate all the swift keys, and recreate the authorized_keys file. This was happening on every run and will now not happen by default, unless the variable is set to "True". Change-Id: Ic4eb05042244c32050233e1445633d5731f9603b Partially-Implements: blueprint multi-region-swift
26 lines
780 B
YAML
26 lines
780 B
YAML
---
|
|
# Copyright 2014, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- include: swift_key_populate.yml
|
|
tags:
|
|
- swift-key
|
|
- swift-key-create
|
|
|
|
- include: swift_key_distribute.yml
|
|
tags:
|
|
- swift-key
|
|
- swift-key-create
|
|
- swift-key-distribute
|