Compare commits
No commits in common. "97334b21ad5bb38d7609740c7c90ef1732fe1756" and "e74b43fde4ebd9418322cdd637725e29d8f4ff5b" have entirely different histories.
97334b21ad
...
e74b43fde4
2 changed files with 19 additions and 25 deletions
|
@ -17,11 +17,11 @@ downloads[f'/tmp/nextcloud-{version}.tar.bz2'] = {
|
|||
'triggered': True,
|
||||
}
|
||||
actions['delete_nextcloud'] = {
|
||||
'command': 'rm -rf /opt/nextcloud/*',
|
||||
'command': 'find /opt/nextcloud -maxdepth 1 ! -path /opt/nextcloud ! -name config ! -name userapps -exec rm -rf {} \;',
|
||||
'triggered': True,
|
||||
}
|
||||
actions['extract_nextcloud'] = {
|
||||
'command': f'tar xfvj /tmp/nextcloud-{version}.tar.bz2 --exclude "^config" --strip 1 -C /opt/nextcloud nextcloud',
|
||||
'command': f'tar xfvj /tmp/nextcloud-{version}.tar.bz2 --skip-old-files --strip 1 -C /opt/nextcloud nextcloud',
|
||||
'unless': f"""php -r 'include "/opt/nextcloud/version.php"; echo "$OC_VersionString";' | grep -q '^{version}$'""",
|
||||
'preceded_by': [
|
||||
'action:delete_nextcloud',
|
||||
|
@ -52,15 +52,6 @@ directories['/var/lib/nextcloud/.cache'] = {
|
|||
'owner': 'www-data',
|
||||
'group': 'www-data',
|
||||
}
|
||||
files['/etc/nextcloud/CAN_INSTALL'] = {
|
||||
'content': '',
|
||||
'owner': 'www-data',
|
||||
'group': 'www-data',
|
||||
'mode': '640',
|
||||
'needs': [
|
||||
'directory:/etc/nextcloud',
|
||||
],
|
||||
}
|
||||
files['/etc/nextcloud/managed.config.php'] = {
|
||||
'content_type': 'mako',
|
||||
'owner': 'www-data',
|
||||
|
@ -70,7 +61,8 @@ files['/etc/nextcloud/managed.config.php'] = {
|
|||
'db_password': node.metadata.get('postgresql/roles/nextcloud/password'),
|
||||
},
|
||||
'needs': [
|
||||
'directory:/etc/nextcloud',
|
||||
'directory:/opt/nextcloud',
|
||||
'action:delete_nextcloud',
|
||||
],
|
||||
}
|
||||
actions['symlink_/opt/nextcloud/config'] = {
|
||||
|
@ -112,7 +104,6 @@ actions['install_nextcloud'] = {
|
|||
'directory:/var/lib/nextcloud',
|
||||
'directory:/var/lib/nextcloud/.apps',
|
||||
'directory:/var/lib/nextcloud/.cache',
|
||||
'file:/etc/nextcloud/CAN_INSTALL',
|
||||
'file:/etc/nextcloud/managed.config.php',
|
||||
'action:extract_nextcloud',
|
||||
'action:symlink_/opt/nextcloud/userapps',
|
||||
|
|
|
@ -30,11 +30,6 @@ defaults = {
|
|||
},
|
||||
},
|
||||
},
|
||||
'backup': {
|
||||
'files': [
|
||||
'/etc/nextcloud/config.php',
|
||||
],
|
||||
},
|
||||
'nextcloud': {
|
||||
'admin_user': 'admin',
|
||||
'admin_pass': repo.vault.password_for(f'{node.name} nextcloud admin pw'),
|
||||
|
@ -59,11 +54,19 @@ defaults = {
|
|||
},
|
||||
},
|
||||
},
|
||||
'zfs': {
|
||||
'datasets': {
|
||||
'tank/nexcloud': {
|
||||
'mountpoint': '/var/lib/nextcloud',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'nextcloud/instance_id',
|
||||
)
|
||||
def instance_id(metadata):
|
||||
return {
|
||||
'nextcloud': {
|
||||
'instance_id': repo.libs.derive_string.derive_string(
|
||||
UUID(metadata.get('id')).bytes,
|
||||
length=12,
|
||||
choices=(string.ascii_lowercase + string.digits).encode(),
|
||||
).decode(),
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue