snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
This commit is contained in:
85
puppet/kandra/manifests/user_dotfiles.pp
Normal file
85
puppet/kandra/manifests/user_dotfiles.pp
Normal file
@@ -0,0 +1,85 @@
|
||||
define kandra::user_dotfiles (
|
||||
$home = '',
|
||||
$keys = false,
|
||||
$authorized_keys = false,
|
||||
$known_hosts = false,
|
||||
) {
|
||||
$user = $name
|
||||
|
||||
if $home == '' {
|
||||
$homedir = "/home/${user}"
|
||||
} else {
|
||||
$homedir = $home
|
||||
}
|
||||
|
||||
file { "${homedir}/.ssh":
|
||||
ensure => directory,
|
||||
require => User[$user],
|
||||
owner => $user,
|
||||
group => $user,
|
||||
mode => '0700',
|
||||
}
|
||||
|
||||
file { "${homedir}/.emacs":
|
||||
ensure => file,
|
||||
require => User[$user],
|
||||
owner => $user,
|
||||
group => $user,
|
||||
mode => '0644',
|
||||
source => 'puppet:///modules/kandra/dotfiles/emacs.el',
|
||||
}
|
||||
|
||||
# Suppress MOTD printing, to fix load problems with Nagios caused by
|
||||
# Ubuntu's default MOTD tools for things like "checking for the next
|
||||
# release" being super slow.
|
||||
file { "${homedir}/.hushlogin":
|
||||
ensure => file,
|
||||
require => User[$user],
|
||||
owner => $user,
|
||||
group => $user,
|
||||
mode => '0644',
|
||||
content => '',
|
||||
}
|
||||
|
||||
if $keys != false {
|
||||
kandra::ssh_keys{ $user:
|
||||
keys => $keys,
|
||||
require => File["${homedir}/.ssh"],
|
||||
}
|
||||
}
|
||||
if $authorized_keys != false {
|
||||
kandra::ssh_authorized_keys{ $user:
|
||||
keys => $authorized_keys,
|
||||
require => File["${homedir}/.ssh"],
|
||||
}
|
||||
}
|
||||
if $known_hosts != false {
|
||||
file { "${homedir}/.ssh/known_hosts":
|
||||
# We mark this as "present" to ensure that it exists, but not to
|
||||
# directly control its contents.
|
||||
ensure => present,
|
||||
owner => $user,
|
||||
group => $user,
|
||||
mode => '0644',
|
||||
require => File["${homedir}/.ssh"],
|
||||
}
|
||||
$known_hosts.each |Optional[String] $hostname| {
|
||||
if $hostname == undef {
|
||||
# pass
|
||||
} elsif $hostname == 'github.com' {
|
||||
$github_keys = file('kandra/github.keys')
|
||||
exec { "${user} ssh known_hosts ${hostname}":
|
||||
command => "echo '${github_keys}' >> ${homedir}/.ssh/known_hosts",
|
||||
unless => "grep ${hostname} ${homedir}/.ssh/known_hosts",
|
||||
require => File["${homedir}/.ssh/known_hosts"],
|
||||
}
|
||||
} else {
|
||||
exec { "${user} ssh known_hosts ${hostname}":
|
||||
command => "ssh-keyscan ${hostname} >> ${homedir}/.ssh/known_hosts",
|
||||
unless => "grep ${hostname} ${homedir}/.ssh/known_hosts",
|
||||
require => File["${homedir}/.ssh/known_hosts"],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user