tripleo-quickstart-extras/playbooks/prepare-slave.yml
John Trowbridge 550be2b780 Add steps needed when using OVB with a testenv broker
This continues the work to merge the OVB playbook in tripleo-ci with
the OVB playbook here. This should again be a no-op change, with the
only new behavior turned on by setting use_testenv_broker=true.

This change completes the differences between the two playbooks before
the undercloud is installed. There are also slight differences in what
we do after the undercloud is installed in the
baremetal-quickstart-extras playbook. Those will be addressed in the
final patch of this series.

Change-Id: Id24b8c4866f46dcb37a98b682f54101a341f9adb
2017-10-25 19:51:22 +00:00

43 lines
1.6 KiB
YAML

# Playbook included in OVB setups that use a testenv broker to create the
# OVB stack.
- name: Local setup for quickstart
hosts: localhost
connection: local
tasks:
- name: Host setup
shell: >
echo "127.0.0.1 $(hostname) $(hostname).openstacklocal" | sudo tee -a /etc/hosts;
echo "127.0.0.2 undercloud undercloud.openstacklocal" | sudo tee -a /etc/hosts;
if [ ! -e ${HOME}/.ssh/id_rsa.pub ] ; then
if [[ -e ${HOME}/.ssh/id_rsa ]]; then
ssh-keygen -y -f ${HOME}/.ssh/id_rsa > ${HOME}/.ssh/id_rsa.pub;
else
ssh-keygen -N "" -f ${HOME}/.ssh/id_rsa;
fi
fi;
sudo mkdir -p /root/.ssh;
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys | tee -a ~/.ssh/authorized_keys;
sudo yum remove -y puppet hiera puppetlabs-release rdo-release centos-release-[a-z]*;
sudo rm -rf /etc/puppet /etc/hiera.yaml;
sudo cp {{tripleo_root}}/tripleo-ci/test-environments/overcloud-cacert.pem /etc/pki/ca-trust/source/anchors/;
sudo update-ca-trust extract;
cp -f {{ lookup('env', 'TE_DATAFILE') }} ~/instackenv.json;
- name: Create eth2.conf file
blockinfile:
dest: "{{ working_dir }}/eth2.conf"
content: |
network_config:
- type: interface
name: eth2
use_dhcp: false
addresses:
- ip_netmask: 10.0.0.1/24
- ip_netmask: 2001:db8:fd00:1000::1/64
create: yes
- name: Install ipmitool if not installed
yum: name=ipmitool state=latest
become: true