Run base-repos as ubuntu on k8s nodes to bootstrap

k8s-on-openstack uses the baked in ubuntu user and ssh keypairs
to interact with the host. Our other roles assume that we'll be
logging in directly as root.

Run base-repos logging in as ubuntu with become: true set so that
we can overwrite the root ssh key with the one allowing direct
login from bridge.

Change-Id: I98e91e0a9e5f4a44fcad8f22a0f710ce2c4138e0
This commit is contained in:
Monty Taylor 2019-02-07 11:26:36 +00:00
parent 7610682b6f
commit 8b71bf1a33

View File

@ -21,3 +21,15 @@
context: gitea
state: present
definition: "{{ lookup('file', 'k8s/storage-class.yaml') | from_yaml }}"
# k8s-on-openstack uses the baked in ubuntu user and ssh keypairs
# to interact with the host. Our other roles assume that we'll be
# logging in directly as root. Run base-repos logging in as ubuntu
# with become: true set so that we can overwrite the root ssh key
# with the one allowing direct login from bridge.
- hosts: "kubernetes:!disabled"
name: "Base: set up users and base package repositories on all hosts"
remote_user: ubuntu
become: true
roles:
- base-repos