Add some SSH keys to tc-mac workers

This commit is contained in:
Simon Sapin 2019-05-16 18:38:38 +02:00
parent ce93e017c6
commit ed4c1ff3d6
3 changed files with 23 additions and 0 deletions

View file

@ -5,6 +5,7 @@ file_roots:
extension_modules: ../modules
ext_pillar:
- taskcluster_secrets:
- ssh_keys:
roster_defaults:
# https://github.com/saltstack/salt/issues/50477
minion_opts:

View file

@ -0,0 +1,14 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import urllib
def ext_pillar(_minion_id, _pillar, *_args):
url = "https://raw.githubusercontent.com/servo/saltfs/master/admin/files/ssh/%s.pub"
return {"ssh_keys": [urllib.urlopen(url % name).read() for name in [
"jdm",
"manishearth",
"simonsapin",
]]}

View file

@ -6,6 +6,14 @@
GMT:
timezone.system
sshkeys:
ssh_auth.present:
- user: root
- names:
{% for key in pillar["ssh_keys"] %}
- {{ key | yaml_encode }}
{% endfor %}
{{ bin }}/generic-worker:
file.managed:
- name: