tripleo-common/roles/tripleo-create-admin
Kamil Sambor 228fadca37 Add task to read remote pub key
Lookups occur on the local machine, not on the remote.
This is reasone why we need to read first key

Depends-On: https://review.opendev.org/#/c/657541/
Change-Id: I80074cad76d989c3a6c2fa1615b621c08503855f
Closes-Bug: 1824326
2019-05-07 12:36:58 +02:00
..
defaults Allow tripleo-admin user to have a keypair 2019-02-25 10:48:23 +13:00
tasks Add task to read remote pub key 2019-05-07 12:36:58 +02:00
README.md Allow tripleo-admin user to have a keypair 2019-02-25 10:48:23 +13:00

TripleO Create Admin

A role to create an admin user to be later used for running playbooks.

Role Variables

Name Default Value Description
tripleo_admin_user tripleo-admin Name of user to create
tripleo_admin_pubkey [undefined] Public key for authorization

Requirements

  • ansible >= 2.4
  • python >= 2.6

Dependencies

None

Example Playbooks

Create and authorize user tripleo-admin

- hosts: localhost
  tasks:
  - import_role:
      name: tripleo-create-admin
    vars:
      tripleo_admin_user: tripleo-admin
      tripleo_admin_pubkey: ssh-rsa AAAA... # etc

Create user tripleo-admin

- hosts: controller-0
  tasks:
  - import_role:
      name: tripleo-create-admin
      tasks_from: create_user.yml

Create user tripleo-admin with a keypair

- hosts: undercloud
  tasks:
  - import_role:
      name: tripleo-create-admin
      tasks_from: create_user.yml
    vars: 
      tripleo_admin_generate_key: true

Authorize existing user

- hosts: localhost
  tasks:
  - import_role:
      name: tripleo-create-admin
      tasks_from: authorize_user.yml
    vars:
      tripleo_admin_user: tripleo-admin
      tripleo_admin_pubkey: ssh-rsa AAAA... # etc