Role - tripleo-create-admin

Role Documentation

Welcome to the “tripleo_create_admin” role documentation.

Role Defaults

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

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

# Set the default admin user
tripleo_admin_user: tripleo-admin

# Enable or disable key generation for the defined user
tripleo_admin_generate_key: false

# When `tripleo_admin_pubkey` is defined an additional authorized key will
# added to the admin users authroized_keys file.
#   tripleo_admin_pubkey: ssh-rsa AAAA...

Molecule Scenarios

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

Scenario: keygen

Driver: podman
Molecule Inventory
hosts:
  all:
    hosts:
      ubi8:
        ansible_python_interpreter: /usr/bin/python3
Example keygen playbook
- name: Converge
  hosts: all
  roles:
  - role: tripleo_create_admin
    tripleo_admin_generate_key: true

Scenario: default

Driver: podman
Molecule Inventory
hosts:
  all:
    hosts:
      ubi8:
        ansible_python_interpreter: /usr/bin/python3
Example default playbook
- name: Converge
  hosts: all
  roles:
  - role: tripleo_create_admin

Scenario: addkey

Driver: podman
Molecule Inventory
hosts:
  all:
    hosts:
      ubi8:
        ansible_python_interpreter: /usr/bin/python3
Example addkey playbook
- name: Converge
  hosts: all
  roles:
  - role: tripleo_create_admin
  post_tasks:
  - import_role:
      name: tripleo_create_admin
      tasks_from: authorize_user.yml
    vars:
      tripleo_admin_user: tripleo-admin
      tripleo_admin_pubkey: ssh-rsa AAAATEST