Set container_name as host_var in test inventory

The connection plugin no longer falls back on using the
inventory_hostname as the container_name. Set container_name as a host
var for each container in the test inventory.

Change-Id: Ic23a77d8f88ed890a219c410d37a94bd97037c53
This commit is contained in:
Jimmy McCrory 2018-10-20 15:28:29 -07:00
parent abb1b6901f
commit 6509751e13
4 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
container_name: "{{ inventory_hostname }}"
container_networks:
management_address:

View File

@ -2,6 +2,7 @@
ansible_host: 10.100.100.2
ansible_become: True
ansible_user: root
container_name: container1
lxc_container_config_list:
- "{{ (hostvars[physical_host | default('localhost')]['ansible_distribution_version'] == '18.04') | ternary('lxc.apparmor.profile', 'lxc.aa_profile') }}=lxc-openstack"
- "lxc.mount.entry=/openstack/{{ inventory_hostname }} opt/test1 none bind,create=dir 0 0"

View File

@ -2,6 +2,7 @@
ansible_host: 10.100.100.3
ansible_become: True
ansible_user: root
container_name: container2
lxc_container_config_list:
# The unconfined profile is causing problems with overlayfs. See https://bugs.launchpad.net/openstack-ansible/+bug/1612412
# Use the lxc2 aa_profile key to test that it is correctly changed in-flight to the required lxc3 key on bionic

View File

@ -2,3 +2,4 @@
ansible_host: 10.100.100.4
ansible_become: True
ansible_user: root
container_name: container3