openstack-ansible/tests/roles/bootstrap-host/tasks/prepare_hostname.yml
Jean-Philippe Evrard e09216aa4e Implement a scenario with no containers
In order to demonstrate that OSA can be built without
any containers, and to validate on a continuous basis
that it still works, a new scenario is implemented to
test it.

As part of this, the following is done:

1. An example environment override file is added which
   sets all the containers with 'is_metal: true' which
   disables the container creation.

2. As haproxy is not used for the scenario on an AIO,
   the haproxy environment configuration is broken out
   from openstack_user_config into its own conf.d file
   and the implementation of it into user space is added
   to all other scenarios.

3. To ensure that the pip lockdown configuration is not
   implemented by the pip install role when the repo
   server doesn't exist yet, we ensure that the var is
   set in the playbook that does the validation.

4. To ensure that rabbitmq is able to correctly start
   up we implement the same host name on the host as
   we do in the inventory. Without this rabbitmq fails.
   In order to do this successfully with ansible, the
   dbus package must be installed on the host, so it is
   added as part of the AIO bootstrapping.

5. The workflow for a deployment needs no changes
   because when the lxc-related playbooks execute, they
   simply skip over because the lxc-related groups are
   empty.

Depends-On: https://review.openstack.org/542307
Change-Id: I67199e1f35c91c4e2c9973e011e856c6ac3fb086
2018-02-08 16:45:53 +00:00

35 lines
1.1 KiB
YAML

---
# Copyright 2018, 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: Ensure the hosts file is templated appropriately
copy:
content: |
127.0.0.1 localhost aio1
127.0.1.1 aio1.openstack.local aio1
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
dest: /etc/hosts
backup: yes
- name: Ensure hostname is set
hostname:
name: aio1