bundles/users: add option to enable lingering
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
9fc86a4d9f
commit
6a144cf991
4 changed files with 62 additions and 5 deletions
|
@ -1,9 +1,5 @@
|
||||||
from os.path import join, exists
|
from os.path import join, exists
|
||||||
|
|
||||||
directories = {}
|
|
||||||
users = {}
|
|
||||||
groups = {}
|
|
||||||
|
|
||||||
files = {
|
files = {
|
||||||
'/etc/bash.bashrc': {
|
'/etc/bash.bashrc': {
|
||||||
'source': 'bashrc',
|
'source': 'bashrc',
|
||||||
|
@ -76,3 +72,18 @@ for username, attrs in node.metadata['users'].items():
|
||||||
files[home + '/.bashrc'] = {
|
files[home + '/.bashrc'] = {
|
||||||
'delete': True,
|
'delete': True,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if attrs.get('enable_linger', False):
|
||||||
|
linger_test = ''
|
||||||
|
linger_command = 'enable'
|
||||||
|
else:
|
||||||
|
linger_test = '!'
|
||||||
|
linger_command = 'disable'
|
||||||
|
|
||||||
|
actions[f'ensure_linger_state_for_user_{username}'] = {
|
||||||
|
'command': f'loginctl {linger_command}-linger {username}',
|
||||||
|
'unless': f'{linger_test} test -f /var/lib/systemd/linger/{username}',
|
||||||
|
'needs': {
|
||||||
|
f'user:{username}',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
|
@ -196,6 +196,7 @@ nodes['htz-cloud.miniserver'] = {
|
||||||
},
|
},
|
||||||
'users': {
|
'users': {
|
||||||
'sophie': {
|
'sophie': {
|
||||||
|
'enable_linger': True,
|
||||||
'ssh_pubkey': [
|
'ssh_pubkey': [
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDILcYrMQNRVXAm5L+7No1ZumqfCyRc1QZmTY3O7Q8hsE4+fCAvwsWm2aSMfLL3NnIl8Nm1Rixzic5jdYKYNIY3SlX1wvTB+MhGb2eyVSd7c/Y98aCLSlDkQ2sebjpdA1FoJOeGD3qxqDwj0+KckXU2ZaSSQY7CxVsjH65UxCHqVAg+6uLdNbj7j850s1B9NXVXef+sBQ5jUngXxnqQWwNh2Mn8auwumkeEG4SYf96wyFkLvmBitOng/GyLWl9YPnXXHHDnatcVipy7y34qw4CQ4P84anecbA+Bqr9IcxBW6qYmYgRKEnAcmEfjQd+BI1gCLB1BBEmb/qp+mVLd4tOh sophie@carbon"
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDILcYrMQNRVXAm5L+7No1ZumqfCyRc1QZmTY3O7Q8hsE4+fCAvwsWm2aSMfLL3NnIl8Nm1Rixzic5jdYKYNIY3SlX1wvTB+MhGb2eyVSd7c/Y98aCLSlDkQ2sebjpdA1FoJOeGD3qxqDwj0+KckXU2ZaSSQY7CxVsjH65UxCHqVAg+6uLdNbj7j850s1B9NXVXef+sBQ5jUngXxnqQWwNh2Mn8auwumkeEG4SYf96wyFkLvmBitOng/GyLWl9YPnXXHHDnatcVipy7y34qw4CQ4P84anecbA+Bqr9IcxBW6qYmYgRKEnAcmEfjQd+BI1gCLB1BBEmb/qp+mVLd4tOh sophie@carbon"
|
||||||
],
|
],
|
||||||
|
|
|
@ -416,6 +416,7 @@ nodes['htz.ex42-1048908'] = {
|
||||||
},
|
},
|
||||||
'users': {
|
'users': {
|
||||||
'kunsi': {
|
'kunsi': {
|
||||||
|
'enable_linger': True,
|
||||||
'groups': [
|
'groups': [
|
||||||
'www-data',
|
'www-data',
|
||||||
'libvirt',
|
'libvirt',
|
||||||
|
|
|
@ -48,14 +48,41 @@ nodes['rx300'] = {
|
||||||
# more php
|
# more php
|
||||||
'php-imagick': {},
|
'php-imagick': {},
|
||||||
'php-yaml': {},
|
'php-yaml': {},
|
||||||
|
|
||||||
|
# used by user:kunsi
|
||||||
|
'mosh': {},
|
||||||
|
'weechat': {},
|
||||||
|
'weechat-core': {},
|
||||||
|
'weechat-curses': {},
|
||||||
|
'weechat-perl': {},
|
||||||
|
'weechat-plugins': {},
|
||||||
|
'weechat-python': {},
|
||||||
|
'weechat-ruby': {},
|
||||||
},
|
},
|
||||||
# XXX remove this once nginx.org has packages for debian bullseye
|
|
||||||
'repos': {
|
'repos': {
|
||||||
|
# XXX remove this once nginx.org has packages for debian bullseye
|
||||||
'nginx': {
|
'nginx': {
|
||||||
'items': atomic({
|
'items': atomic({
|
||||||
'deb http://nginx.org/packages/debian buster nginx',
|
'deb http://nginx.org/packages/debian buster nginx',
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
'weechat': {
|
||||||
|
'items': {
|
||||||
|
'deb https://weechat.org/debian {os_release} main',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'backup-client': {
|
||||||
|
'pre-hooks': {
|
||||||
|
# 'kunsi-weechat': \
|
||||||
|
# 'echo \'core.weechat */layout store\' >> /home/kunsi/.weechat/weechat_fifo\n' \
|
||||||
|
# 'echo \'core.weechat */save\' >> /home/kunsi/.weechat/weechat_fifo\n',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'backups': {
|
||||||
|
'paths': {
|
||||||
|
'/home/kunsi/.weechat',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'check-mail-received': {
|
'check-mail-received': {
|
||||||
|
@ -117,6 +144,22 @@ nodes['rx300'] = {
|
||||||
'install_ssh_key': True,
|
'install_ssh_key': True,
|
||||||
'domain': 'jenkins.franzi.business',
|
'domain': 'jenkins.franzi.business',
|
||||||
},
|
},
|
||||||
|
'letsencrypt': {
|
||||||
|
# 'concat_and_deploy': {
|
||||||
|
# 'kunsi-weechat': {
|
||||||
|
# 'match_domain': 'part.of.the.trans-agenda.eu',
|
||||||
|
# 'target': '/home/kunsi/.weechat/ssl/relay.pem',
|
||||||
|
# 'chown': 'kunsi:kunsi',
|
||||||
|
# 'chmod': '0440',
|
||||||
|
# 'commands': [
|
||||||
|
# 'echo \'core.weechat */relay sslcertkey\' >> /home/kunsi/.weechat/weechat_fifo'
|
||||||
|
# ],
|
||||||
|
# },
|
||||||
|
# },
|
||||||
|
# 'domains': {
|
||||||
|
# 'part.of.the.trans-agenda.eu': set(),
|
||||||
|
# },
|
||||||
|
},
|
||||||
'miniflux': {
|
'miniflux': {
|
||||||
'domain': 'rss.franzi.business',
|
'domain': 'rss.franzi.business',
|
||||||
},
|
},
|
||||||
|
@ -256,6 +299,7 @@ nodes['rx300'] = {
|
||||||
},
|
},
|
||||||
'users': {
|
'users': {
|
||||||
'kunsi': {
|
'kunsi': {
|
||||||
|
'enable_linger': True,
|
||||||
'groups': {
|
'groups': {
|
||||||
'libvirt',
|
'libvirt',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue