Renamed Director -> Undercloud.

Small patch to remove install issue

Change-Id: Idfcbb47b596648090df3d1a0f47c67356a6a4a9f
This commit is contained in:
Joe Talerico 2015-12-14 19:37:36 -05:00 committed by Alex Krzos
parent f53f5d192e
commit 9a77b01e1e
7 changed files with 32 additions and 34 deletions

View File

@ -59,10 +59,10 @@
# fernet token setup:
#
- name: Create fernet keys directory
- name: Create fernet keys undercloud
file:
path=/etc/keystone/fernet-keys
state=directory
state=undercloud
owner=keystone
group=keystone
mode=0700

View File

@ -1,14 +1,14 @@
#!/bin/bash
if [ ! $# == 2 ]; then
echo "Usage: ./gen_hostfiles.sh <ospd_ip_address> <ssh_config_file>"
echo "Generates ssh config file to use OSP director host as a jumpbox and creates ansible inventory file."
echo "Generates ssh config file to use OSP undercloud host as a jumpbox and creates ansible inventory file."
exit
fi
ospd_ip_address=$1
ansible_inventory_file='hosts'
ssh_config_file=$2
# "Hackish" copy ssh key to self if we are on directly on the director machine:
# "Hackish" copy ssh key to self if we are on directly on the undercloud machine:
if [[ "${ospd_ip_address}" == "localhost" ]]; then
cat ~stack/.ssh/id_rsa.pub >> ~stack/.ssh/authorized_keys
sudo bash -c "cat ~stack/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys"
@ -88,7 +88,7 @@ echo "---------------------------"
echo "Creating ansible inventory file:"
echo "---------------------------"
echo ""
echo "[director]" | tee ${ansible_inventory_file}
echo "[undercloud]" | tee ${ansible_inventory_file}
echo "${ospd_ip_address}" | tee -a ${ansible_inventory_file}
if [[ ${#controller_hn} -gt 0 ]]; then
echo "" | tee -a ${ansible_inventory_file}

View File

@ -5,6 +5,6 @@ connmon_host: 192.0.2.1
dns_server: 8.8.8.8
pbench_repo_file_url: http://pbench.example.com/repo/yum.repos.d/pbench.repo
# Enterprise Linux Repo name. Copied from director to controllers for
# Enterprise Linux Repo name. Copied from undercloud to controllers for
# installing any pbench dependencies
repo_name: rhos-release-rhel-7.2.repo

View File

@ -1,18 +1,18 @@
---
#
# Playbook to install connmon and pbench on director/overcloud
# Playbook to install connmon and pbench on undercloud/overcloud
#
- hosts: director
- hosts: undercloud
remote_user: stack
vars:
connmon: false
director: true
undercloud: true
pbench: false
shaker: false
roles:
- common
- director
- undercloud
- connmon
- pbench
- shaker
@ -21,11 +21,9 @@
remote_user: heat-admin
vars:
connmon: false
director: false
undercloud: false
pbench: false
shaker: false
director_root_ssh_key: "{{ lookup('file', 'roles/pbench/files/director_root_id_rsa.pub') }}"
director_stack_ssh_key: "{{ lookup('file', 'roles/pbench/files/director_stack_id_rsa.pub') }}"
roles:
- common
- connmon

View File

@ -27,6 +27,6 @@
when: connmon
# To remove the screen session: screen -X -S connmond kill
- name: Run connmond in screen session on director
- name: Run connmond in screen session on undercloud
command: screen -d -S connmond -m connmond
when: connmon and director
when: connmon and undercloud

View File

@ -3,14 +3,14 @@
# Tasks for pbench
#
- name: Get repo file from director
- name: Get repo file from undercloud
fetch: src=/etc/yum.repos.d/"{{ repo_name }}" dest=roles/pbench/files/el.repo flat=yes
when: pbench and director
when: pbench and undercloud
changed_when: false
- name: Copy repo file to controllers/computes
copy: src=el.repo dest=/etc/yum.repos.d/
when: pbench and not director
when: pbench and not undercloud
- name: Install pbench repo file
get_url: url="{{ pbench_repo_file_url }}" dest=/etc/yum.repos.d/pbench.repo
@ -20,32 +20,32 @@
yum: name=pbench-agent state=latest
when: pbench
- name: Ensure pbench directory exists as stack user on director
- name: Ensure pbench directory exists as stack user on undercloud
file: path=/var/lib/pbench-agent state=directory owner=stack group=stack recurse=yes
when: director and pbench
when: undercloud and pbench
- name: Ensure pbench id_rsa is owned by stack
file: path=/opt/pbench-agent/id_rsa owner=stack group=stack
when: director and pbench
when: undercloud and pbench
- name: Get director root ssh public key
fetch: src=/root/.ssh/id_rsa.pub dest=roles/pbench/files/director_root_id_rsa.pub flat=yes
when: director and pbench
- name: Get undercloud root ssh public key
fetch: src=/root/.ssh/id_rsa.pub dest=roles/pbench/files/undercloud_root_id_rsa.pub flat=yes
when: undercloud and pbench
changed_when: false
- name: Get director stack ssh public key
fetch: src=/home/stack/.ssh/id_rsa.pub dest=roles/pbench/files/director_stack_id_rsa.pub flat=yes
when: director and pbench
- name: Get undercloud stack ssh public key
fetch: src=/home/stack/.ssh/id_rsa.pub dest=roles/pbench/files/undercloud_stack_id_rsa.pub flat=yes
when: undercloud and pbench
changed_when: false
- name: Unblock root user ssh on controllers/computes
lineinfile: dest=/root/.ssh/authorized_keys state=absent regexp="Please login as the user" mode=0600
when: not director and pbench
when: not undercloud and pbench
- name: Copy director root ssh public key to controllers/compute root user's authorized_keys
lineinfile: dest=/root/.ssh/authorized_keys state=present line="{{ director_root_ssh_key }}"
when: not director and pbench
- name: Copy undercloud root ssh public key to controllers/compute root user's authorized_keys
lineinfile: dest=/root/.ssh/authorized_keys state=present line="{{ undercloud_root_ssh_key }}"
when: not undercloud and pbench
- name: Copy director stack ssh public key to controllers/compute root user's authorized_keys
lineinfile: dest=/root/.ssh/authorized_keys state=present line="{{ director_stack_ssh_key }}"
when: not director and pbench
- name: Copy undercloud stack ssh public key to controllers/compute root user's authorized_keys
lineinfile: dest=/root/.ssh/authorized_keys state=present line="{{ undercloud_stack_ssh_key }}"
when: not undercloud and pbench