From 5413810c3ec47f4b95d8c9e922482eabae885ae1 Mon Sep 17 00:00:00 2001 From: "jinguk.kwon" Date: Fri, 16 Nov 2018 00:27:50 +0900 Subject: [PATCH] move the cdist type to code.ungleich.ch --- README.rst | 1 + files/carlos.pub | 1 + files/dave.pub | 1 + files/dominique.pub | 1 + files/henk.pub | 2 ++ files/kamila-phone.pub | 1 + files/kamila.pub | 1 + files/moep.pub | 1 + files/nico.pub | 1 + files/poljakowski.pub | 1 + files/sar.pub | 1 + files/tobias.pub | 1 + files/youngjin.pub | 1 + man.rst | 38 ++++++++++++++++++++++++++++++ manifest | 51 +++++++++++++++++++++++++++++++++++++++++ parameter/default/state | 1 + parameter/optional | 1 + 17 files changed, 105 insertions(+) create mode 120000 README.rst create mode 100644 files/carlos.pub create mode 100644 files/dave.pub create mode 100644 files/dominique.pub create mode 100644 files/henk.pub create mode 100644 files/kamila-phone.pub create mode 100644 files/kamila.pub create mode 100644 files/moep.pub create mode 100644 files/nico.pub create mode 100644 files/poljakowski.pub create mode 100644 files/sar.pub create mode 100644 files/tobias.pub create mode 100644 files/youngjin.pub create mode 100644 man.rst create mode 100644 manifest create mode 100644 parameter/default/state create mode 100644 parameter/optional diff --git a/README.rst b/README.rst new file mode 120000 index 0000000..273c72b --- /dev/null +++ b/README.rst @@ -0,0 +1 @@ +man.rst \ No newline at end of file diff --git a/files/carlos.pub b/files/carlos.pub new file mode 100644 index 0000000..f165716 --- /dev/null +++ b/files/carlos.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9IFUunP3XtfTwN+kn6Tgqkm71jyaPf9j/JXhY4/tyJ2xbFeceXnyRHMF0LAAKUZjl+EjLsKrxuBwGDT1l1ohImgvre0a8ST/lsAprNusgVtfXMHo6CmQhNzdGDqRoebiKT3uzxxfqPWs0X4ziyYria09gEDhZyrmg/U5UZtFQmZew2S+zSWlfEISId/65/6bvYBA2dwmMK8PWPZ0XVclmL7kl+MEc7S6VphM4ZKmr27MhGkbUXLox9N4uJ1cpN0+PWrgs5YytxUx+7fxDTsSlz/bKpr99mc0ZC+ThDCk4/4a0hwwkfa+9zEcDyloGxcRwb2U79nCJzalPaDE3BTRt root@localhost diff --git a/files/dave.pub b/files/dave.pub new file mode 100644 index 0000000..a40598e --- /dev/null +++ b/files/dave.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDwb7NjlqXeq64ngmnDkx8lbTnYoXpTPHMNnc4EORtFL4oAHWjD7kntAGRzZw5wrCputvm1wv2sAfeMQK5U/0EsGozPSbipcSaN8lvLMmHIpDYZsGCrK+7CQj/pmZXDwVHbtqBjw3MHe3NyTMNTEmmjAm+D4dD4f65RIqhm+02G0TzYU0i8LdGA9Y/XNiok45puVmLcbM/7+FARL3sc69HvbzYVt8p/FofdY9ORx32P1SsqJqe4vSglK/NKf5ehx9zI102kNvRzHBjLBSyldIqep4o+pydkq2wGhcy5Gw66hXDUGCWeAYAOoHxSxBpZANNf+c/6ZkSgAYB5QmT8p0KL david@panther05 diff --git a/files/dominique.pub b/files/dominique.pub new file mode 100644 index 0000000..23926ac --- /dev/null +++ b/files/dominique.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCo+g71zZ4ScxqjD6EdI9yfsAxINyoRfkEbxrPzmBS+JLgRtFO6sz0H+dyQdtA1cJiK6OF/9tk4KwX/+ONe601VrBH4uv++O8yy9VbxBhnIuaSP8U6S7FUDq6upbCFnB9SjAYhdSGsXVgcu7q62MbAButSYsEZOOWzaZgXzHWayo/zSYz011ISUf7ZbphlJsrXpGupDgCmabpYcv0HklZoBOIvxH3ukdnZ8vC2K4uw17PDxelc+o2jc/DNZSVg4D4sd4DyzpJK5WAl4YhYr1mcZG0y4vYa1reoxpY2+WxAj6uAkPuLQvjKywERxyFclRHY1CdIpHz5LwobctD7oHuIb rouxdo@roux-arch diff --git a/files/henk.pub b/files/henk.pub new file mode 100644 index 0000000..7d3553c --- /dev/null +++ b/files/henk.pub @@ -0,0 +1,2 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDi50B8Og80+wDHoVZccw2BIWYTcgAxfu8q7rrvMhnFCQAHDgIg7bkSl0JTUH8z1I/jq3G/+nJv396EaFsz3k7mzaTG+LS90L52y6ULMmbmGhDusEeryeod8mFWGWtGMZC75ns11EUTGPw+nCaBA9hBEk5aRNP2zskNB8ZRT5At0pGBAX6m1kskIYdeZmI514Z6Yl+Bp8oGdACn7eo3dLhi8kr6kR04zn4s6o87Uoq30Hb5zCVlMifhjIH9ebfW/sE6R+94ZH60SMGtPI4BIzFINzgxRd8Ptdvfct3WCCEOjXBmHWktG9Ok0LOGR1dXuQHflSLxeDQshYj19992SrH1uHQIvYTZycNQKpqVnqBS3455Dk7ZqG14xxjvI3oVqIbkqkEmo8uxg3S197AuRa2rYfwISAD3CREIaEd5evWOArIIhYk/o9MOMVYcmV15BpRu9GGonzVi6mxk7qz0LpwuN5qHkYlB4V7ILW3xSzI7SkzTWyPuMEItFZScduQ0d6UvfYZf3LgUmnN9oOVTLBBBuUY8Wncb54zBkBxvR1RcmJPlPMMq9rJteMRxfWEQXgZG/cHHI/XEP9lwjgRdd11EE5LfWZGVR7E2T/R7/OO5F7eUCWE0/f9rry5d0wV5PYYcPEi9To3KGxVMoyegaM8J9mEeB9GJu1IDFT54PIUEGQ== + diff --git a/files/kamila-phone.pub b/files/kamila-phone.pub new file mode 100644 index 0000000..b02487a --- /dev/null +++ b/files/kamila-phone.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4xjBXXH2UVU039BbXTxANOIpIy4Aa9OY8N4lMDJBFkkEyfwofrtKjXztPyai38ndbjU+6/5deZ/zn9qhHwZ4PJMAtBHhGDjU4M74Wb5ABu+xysvQ/kpyhbUartbp/WLeqIt0DpX18cYlahtMvC+4VG0q6invitkg4WmyFEll98V88OtStoDxaLVqOO6hH8pczKVUVkQQ4AVOnH1R98EUyTYLUZyy8wwynFpoS6Wp7k7JVtkKAvoXOFWBQVQPqxYyxyy3gYVCI2EPNiS1VzWVqiN0Dvf6H1WwDeB5QR/gTiZbgu7nO2in6gjymOgkoNJb7a3oVgqLmoULSPAnmnMZ7 kamila-JuiceSSH diff --git a/files/kamila.pub b/files/kamila.pub new file mode 100644 index 0000000..d238da8 --- /dev/null +++ b/files/kamila.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1aE0LJZcnGMAdJsEPk3v7ukd7CJORnAGmwgOEM83pufY/gw1QlB6Cr/OUo49zOQg54xkrgAXtpeA3ozlyGuFd3umbu/JKkwle6A8aGj7F84l4ElvJfN7uX8N3FmZhg1bExmKDUrrnQhcG0hBeV2CdRyPaKu/Izy+KNiEiNMCcGbCbdmXY0EYQQcnDf1PPFLDn1XMd50h0ndpTlZbMzXPZ9RjWRRM1oHU2hWPolMZQFInBD5BpkjAGawCpSw/ViodvbyxpBNRN1NlCeTa3GyHm4XDdQVCB6+c6DFWyWte57BwrLo+Pn50VGwHnqkmO43UqLv72ZutXrbhv1gWB7kzefiTrAFw3OFqoN0yuTBI3r2MVmCvGgkT6/tefGzBYTrdyjSbQ017VRrrKggh1TUY3bBFIM+zkm3Ob2SfNMRkuCZwAF7BKAL+lJlB5kDOI8Y3NjZCrGpLQBUwB+h9hv4D4CJ/qfcZ/yw0xSRHtsnsRDwLa5QAJOtIrcl1a75yupEojUecQ/PRv52YPg1mTVI9FE6nFc4UXn6yOddaZIkaaukpkJVdD0PRpHszU/ixxn8SUveviKKXlr79KbsBFAWllhtgzys6bc7PCoaLs7x+HNKPT4bRxhz7iNewJsi0uA9//dD6eiFTBJCldADvZH5Zv/na1gpgVsq5h4mvrJx9idw== kamila@entropy-2016-10-25 diff --git a/files/moep.pub b/files/moep.pub new file mode 100644 index 0000000..10b4424 --- /dev/null +++ b/files/moep.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDiLmPeHx0uwYRTV523aKmw04sCLRX5TlCtqKaIHULS+ga+uBURtbunl8XKDDNduMvLKnQLAsmknOyE5PjBgo0OHurgcS0XqePqG/ICnKbEJkHCGnKAJtCyQ6kMEe2k2AKhBo3hwUaB8UOaVu759ffTxKFHpGq7rwmDuDS49dO9PEr4SKYPLeUhIlCMsy1oUUiIzolfFszzfyBuWimyljdyM8zFSostGm3SF93XYLzxWymx0oxx0A7D9S7CakLE/xGDznBUsivAp8UmYqO54kPZitAkMVClUQc2Rz7dz3YDbmSXV8eVUMkBJD4tb/6fgcmiwluneOFVjlHqidveHQ5HC7TW2cEb8AYrNgO5IPeUFsoRu/NJ3hTuZATUIHjz+H9Yx/rtsE75ygOYoL8X5bsD3NOzcXv7y0l6/kceWWICY3PGNlVHnTtRWZ2vNZpE0dziZgC0FC+XGit+xG6O43HbmQgjETG4X5SlvE0df3rUZoIcJXKsgpRlEu4hLqmriws5ewbictAqbcmcpGDSfT7QDqTOTiSLgUyzJw9oHaPX+Kr0rq89Q79GM074xps+T9UXlvm/6Oeja6Q5t/6jkl/shyWB6+7ZMgddLd0aTVWZBJ+vOdLMhCOK8l32XGDXaVnMMWn+3T7RKnVIdUYE4CVgE8Lx++xFjl/vM+szH3M2LQ== moep diff --git a/files/nico.pub b/files/nico.pub new file mode 100644 index 0000000..65130e1 --- /dev/null +++ b/files/nico.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCjWYALKYHTs6mX7GrrpxR0TPhxwVplmmcTPAA7zjhVCZajcUwLduy3Yct4YXBwRiEydGyhExoVVB8i7UhyvMQsTheRk751uJZyKWIkqbQJoJx1LPmZ00EJNaiIEiJih762D9KWZ1GoLBfB4QAEmoWDzVm3CFJ9tBVEsQ7i9BH+Cbe2GsnqflfWjb09bZhaOSTrmWNcBxgpXirZyi8EI0SrVtmnwVzdH8HXOalvFqW57aY1q/RjE1DIh7Pp+RiGscZz6CJ5oJtSEKbjZ2aUe4gomlQwYmGNVk22RdjvB7+0KDXMwdp702Z5ETv2xYk9v5YrA/lsWk/9JX8vGYb5Y5N+GGG9woZ5M1JIRjXduxNf68VMSQbxZTeonoWkh6Q8CNgDsHyyAyNuPAss7SCCGk5G8s0q/4IDGfV0A1QKFhHOId1qEqGQtLKaRbo6ZTi9wXSieA5D3kMNh+WWufutxI/t56USzNSaeYjqpYwiICBZ8jzWBJrDamiFne4KkW3PTao7Czv6yIeXHHfGYDtdvXppMSjamw+rbA/btTes5X+pYlFxniO5sZJUa+jnJOo3SYBGoRYftqxw7Usqm/i/koHP1RM8L3Iq+/xXNr5+AyFzRBCUUuDfRw1MY1n9OJXvYykNGth4ablfVFcP1R8Qq7jVGksK1dzckzD9SmCdubzwtw== nico-2014 diff --git a/files/poljakowski.pub b/files/poljakowski.pub new file mode 100644 index 0000000..a83f46f --- /dev/null +++ b/files/poljakowski.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSX72W5nS8D/A7svs5UCuQGlJdLWu4HFUQ2cMPwzsKnbmTR8iSs60kQxMoP+SwIUD1gFKGtYmcmM25SmuHKgLxuSUL7hrL+GWXRObiPk1CdqzUTT0Q0i4eHCsI+D9MmNC6ShSsLTdfs0cJmWM8Chhx6ZgoSD3BMpCf0fw5JPppQNX88xdUyva4yqr3qL7MsiJUEyHHDHDzExsaNaoSGdq60XrMw0aUKb8cnv61apjPl2zy/vc714XPkT1iq33WPLkLy1fabMWPf6lHlbX791oy9WZGeCO7xdj3Qx4TgbKOiwLICkbGZby6PmCLTwpFOE3D8BANWLme61t2q/rxZYI5 darko@icosahedron diff --git a/files/sar.pub b/files/sar.pub new file mode 100644 index 0000000..8fb89d9 --- /dev/null +++ b/files/sar.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEA1wro/UuQ9yY+5NRF4j7xA+Pq6H2VmrlJnkGnwOVH0P5Bb5YihK6TunoYVI895Ic0JOqrJJIJHHuyg2WyYloquMvAiAC2vrkRgtEtGJp0nnvqupzm7EsobJaC5SKdE52CU8HRUTnUq2yb7Ayw4taaj7y3lDblDTGhSrzUcnAmFoxKBYgwwtqPc5GzFf9ytXHv8Tr3ga1DvKKKvbZNAChTaV/O7Hqx8Z6oolQQ9ElvxyZHrOru3dQjVpuxA7JWXlI+IxkH1nt79F2ZZP/kyZPBL2RXz+exmCqPB4klPPKucpHHB2wCailndgbUwDQrEMOnl9FYTQ7B44XzRJURfXZu1HccYglFMYosxAQAYBCNFco6g8DamHZw/6GMeGPXi6hcnYLXjpROAs5B5BLe+0BhUHqaD5m/SvteggQV6cYnJAm/JauNTqyTtXpmeP40mQgVNHOGuWzbmxvmdAoVu1wUz5SRMKSEBqu3qWU8ssFfmKGu9ANVZAWM1Q7yYb3eUqOsVxBkpDWNE7L2iyOwD7Io2GQBX10HzCu1neYrtNnnIEimfwuqyRSI2TYQyGsiwxWHlLWJcxZW9IE+T3r6dN8dka7KDHAlQTlcKawOXx6wcJtEZ/bYDi8ra0WiN+GCAY1NsYQRmt5wA7vlBFWkwHC5XWDmjN/mXx0Y1N1LZTvT7yk= sar@icarus diff --git a/files/tobias.pub b/files/tobias.pub new file mode 100644 index 0000000..ceb29c1 --- /dev/null +++ b/files/tobias.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDkUAYrVGKPwRLrWGpXDAtok3f4hp5WpkIj7x1WjKSzo6BMEgNcqroxeByTfV3s34JSOHjvnmE+8ly+rxZHqFXDnT4vlnCS6Vojsbs7DbF7NGQSqU6RWM14BnkozJwQ2Jdn8IJr3iX6VAtWHBJP+HwZpX6pWE9Bmdbt7dbSIMt1uO4BVMZkSinDm5qB/o2KVv9+vKEnMDVf9+9hiddnJ8nln/x78nYXTeWL6RCXNToJ/nZbJlzQZYahHA4rrBfJM7l4+aV0UMOZ7M9MhnuPaHXtME1P4UNDcsGy23RDHYtRbMhJoLYU4Vv45KAtryhg1u3zuTsHq471uIRdwS1R/KzD rayt@sandy diff --git a/files/youngjin.pub b/files/youngjin.pub new file mode 100644 index 0000000..c19e8e9 --- /dev/null +++ b/files/youngjin.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCacBT1ShGJTl08X9CkV6/Z5JCihNU2cgGN3SLhwUvYbMbTotwu0FRFXUfHtO3HvFk5CrXG1YITMbWbPYRvh7u2k0KrANPPdPV42r9JeQqc8pJjYVOeGCuFLRlxEch9Gx4llBlemLbmmjLsr/2k9391VT66UiL1PvxQl/fuGX5UTNAKcG1jpfgy+dLilujP54LxfOTmAH6AIfBBc7T/nQvdXRWgib3jKW51v3bCj48RZsWQdhSlPWQKIXTQQ774iPfE84zBx5WYNJ2tkey/chUYPaLvtrcQfMHnfjErVZ78W9SaLS1GRGiRd3ccXmoP3/RZS+lYUVhyf3Qiz/xQyUOz root@localhost.localdomain diff --git a/man.rst b/man.rst new file mode 100644 index 0000000..31100d3 --- /dev/null +++ b/man.rst @@ -0,0 +1,38 @@ +cdist-type__ungleich_staff_ssh_access(7) +========================================= +Give access to ungleich staff + +ungleich GmbH + + +DESCRIPTION +----------- +This cdist type ensures that the staff of ungleich +can access the target system. + + +EXAMPLES +-------- + +.. code-block:: sh + + # Grant access to root + __ungleich_staff_ssh_access root + + # More explicitly + __ungleich_staff_ssh_access anotheruser --state present + + # Remove access for ungleich staff + __ungleich_staff_ssh_access root --state absent + + +SEE ALSO +-------- +- `cdist-type(7) `_ + + +COPYING +------- +Copyright \(C) 2014 ungleich GmbH (www.ungleich.ch). +Free use of this software is granted under the terms +of the GNU General Public License version 3 (GPLv3). diff --git a/manifest b/manifest new file mode 100644 index 0000000..c235012 --- /dev/null +++ b/manifest @@ -0,0 +1,51 @@ +#!/bin/sh +# +# 2014 ungleich GmbH (cdist at ungleich.ch) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# + + +user="$__object_id" +state=$(cat "$__object/parameter/state") + + +################################################################################ +# not at ungleich GmbH (anymore) +# +set -- +for key in dave henk tobias carlos moep; do + keyfile="$__type/files/${key}.pub" + set -- "$@" --key + set -- "$@" "$(echo $(cat "$keyfile"))" +done + +__ssh_authorized_keys "ungleich-staff-absent-$user" \ + --owner "$user" --state absent "$@" + +################################################################################ +# currently at ungleich GmbH +# +set -- +for key in nico dominique kamila kamila-phone poljakowski youngjin; do + keyfile="$__type/files/${key}.pub" + + set -- "$@" --key + set -- "$@" "$(echo $(cat "$keyfile"))" +done + +__ssh_authorized_keys "ungleich-staff-$user" \ + --owner "$user" --state "$state" "$@" diff --git a/parameter/default/state b/parameter/default/state new file mode 100644 index 0000000..e7f6134 --- /dev/null +++ b/parameter/default/state @@ -0,0 +1 @@ +present diff --git a/parameter/optional b/parameter/optional new file mode 100644 index 0000000..ff72b5c --- /dev/null +++ b/parameter/optional @@ -0,0 +1 @@ +state