Role - tripleo-hosts-entries

Role Documentation

Welcome to the “tripleo_hosts_entries” role documentation.

Role Defaults

This section highlights all of the defaults and variables set within the “tripleo_hosts_entries” role.

# All variables intended for modification should be placed in this file.

# All variables within this role should have a prefix of "tripleo_hosts_entries"
tripleo_hosts_entries_debug: '{{ (ansible_verbosity | int) >= 2 | bool }}'
tripleo_hosts_entries_hosts_path: /etc/hosts
tripleo_hosts_entries_undercloud_hosts_entries: ''
tripleo_hosts_entries_extra_hosts_entries: ''
tripleo_hosts_entries_overcloud_hosts_entries: '{{ hosts_entry }}'

Role Variables: main.yml

null
...

Molecule Scenarios

Molecule is being used to test the “tripleo_hosts_entries” role. The following section highlights the drivers in service and provides an example playbook showing how the role is leveraged.

Scenario: default

Driver: podman
Molecule Inventory
hosts:
  all:
    hosts:
      centos:
        ansible_python_interpreter: /usr/bin/python3
    vars:
          # use a tmp hosts path since /etc/hosts isn't writeable in the
          # molecule test containers
      tripleo_hosts_entries_hosts_path: /tmp/hosts
      tripleo_hosts_entries_overcloud_hosts_entries:
      - 192.168.24.1 centos.localdomain centos
      - 192.168.24.1 centos.ctlplane.localdomain centos.ctlplane
      - 172.17.0.1 centos.internalapi.localdomain centos.internalapi
      tripleo_hosts_entries_undercloud_hosts_entries: []
      tripleo_hosts_entries_extra_hosts_entries: []
      tripleo_stack_name: overcloud
      plan: overcloud
    children:
      allovercloud:
        hosts:
          centos:
            hostname_resolve_network: ctlplane
            ctlplane_ip: 192.168.24.1
            internal_api_ip: 172.17.0.1
Example default playbook
- name: Converge
  hosts: all
  roles:
  - role: tripleo_hosts_entries