diff --git a/dockerbox.yml b/dockerbox.yml index 8034611..b8fae16 100644 --- a/dockerbox.yml +++ b/dockerbox.yml @@ -18,5 +18,8 @@ roles: - base - docker + - traefik + - nextcloud + - gitea - jenkins - prometheus diff --git a/roles/base/tasks/system.yml b/roles/base/tasks/system.yml index dee5cec..15ae03e 100644 --- a/roles/base/tasks/system.yml +++ b/roles/base/tasks/system.yml @@ -2,3 +2,9 @@ apt: name: ["vim", "wget"] state: present + +- name: Manage root authorized_keys + template: + src: authorized_keys.j2 + dest: /root/.ssh/authorized_keys + when: authorized_keys is defined diff --git a/roles/base/templates/authorized_keys.j2 b/roles/base/templates/authorized_keys.j2 new file mode 100644 index 0000000..b40ed15 --- /dev/null +++ b/roles/base/templates/authorized_keys.j2 @@ -0,0 +1,3 @@ +{% for key in authorized_keys %} +{{ key.key }} {{ key.name }} +{% endfor %}