a4431dfba6
Currently, a number of OpenStack commands are run as root (namely, those management related commands to handle db creation/migrations). This change updates these affected tasks to use sudo to run the commands as the correct user. We also make a few other minor changes, namely: - updating some hard-coded users to reflect {{ system_user }} instead - removing nova_compute_sshkey_create role from nova-compute.yml playbook (this role is already listed in nova-compute-keys.yml, which is included in nova-all.yml) - adding a vars_files to nova-compute-keys.yml so we can reference {{ system_user }} instead of the hard-coded nova user - updating the 'Create the nova SSH key if it doesnt exist' task to use sudo rather than su
20 lines
695 B
YAML
20 lines
695 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.
|
|
|
|
- name: Perform a Nova DB sync
|
|
command: nova-manage db sync
|
|
sudo: yes
|
|
sudo_user: "{{ system_user }}"
|