ansible-base/roles/dokuwiki/tasks/main.json

211 lines
5.1 KiB
JSON
Raw Permalink Normal View History

2023-12-17 15:07:55 +01:00
[
{
2023-12-18 08:13:17 +01:00
"name": "packages",
"become": true,
"ansible.builtin.apt": {
"pkg": [
"unzip",
"php8.2-fpm",
2023-12-18 08:40:46 +01:00
"php8.2-xml"
2023-12-18 08:13:17 +01:00
]
}
},
2023-12-19 23:09:23 +01:00
{
"name": "core | preparation",
"ansible.builtin.file": {
"state": "directory",
"path": "/tmp/dokuwiki-core"
}
},
2023-12-18 08:13:17 +01:00
{
"name": "core | acquisition",
"ansible.builtin.get_url": {
"url": "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz",
"dest": "/tmp/dokuwiki.tgz"
}
},
{
"name": "core | extraction",
"ansible.builtin.unarchive": {
"remote_src": true,
"src": "/tmp/dokuwiki.tgz",
2023-12-19 23:09:23 +01:00
"dest": "/tmp/dokuwiki-core"
2023-12-18 08:13:17 +01:00
}
},
{
"name": "core | version retrieval",
2023-12-19 23:09:23 +01:00
"ansible.builtin.command": {
"cmd": "ls /tmp/dokuwiki-core"
2023-12-18 08:13:17 +01:00
},
"register": "temp_core_version_output"
},
{
"name": "core | directory",
2023-12-17 15:07:55 +01:00
"become": true,
"ansible.builtin.file": {
"state": "directory",
"path": "{{var_dokuwiki_directory}}",
"owner": "www-data"
}
},
{
2023-12-18 08:13:17 +01:00
"name": "core | emplacement",
"become": true,
"ansible.builtin.copy": {
"remote_src": true,
2023-12-19 23:09:23 +01:00
"src": "/tmp/dokuwiki-core/{{temp_core_version_output.stdout}}/",
2023-12-18 08:13:17 +01:00
"dest": "{{var_dokuwiki_directory}}",
"owner": "www-data"
2023-12-17 15:07:55 +01:00
}
},
{
2023-12-19 23:09:23 +01:00
"name": "plugin 'oauth' | preparation",
"ansible.builtin.file": {
"state": "directory",
"path": "/tmp/dokuwiki-plugin-oauth"
}
},
{
"name": "plugin 'oauth' | acquisition",
2023-12-18 08:13:17 +01:00
"when": "var_dokuwiki_oauth2_enable",
"ansible.builtin.get_url": {
"url": "https://github.com/cosmocode/dokuwiki-plugin-oauth/zipball/master",
"dest": "/tmp/dokuwiki-plugin-oauth-base.zip"
}
},
{
2023-12-19 23:09:23 +01:00
"name": "plugin 'oauth' | extraction",
2023-12-18 08:13:17 +01:00
"when": "var_dokuwiki_oauth2_enable",
2023-12-17 15:07:55 +01:00
"ansible.builtin.unarchive": {
"remote_src": true,
2023-12-18 08:13:17 +01:00
"src": "/tmp/dokuwiki-plugin-oauth-base.zip",
2023-12-19 23:09:23 +01:00
"dest": "/tmp/dokuwiki-plugin-oauth"
2023-12-17 15:07:55 +01:00
}
},
{
2023-12-19 23:09:23 +01:00
"name": "plugin 'oauth' | version retrieval",
2023-12-18 08:13:17 +01:00
"when": "var_dokuwiki_oauth2_enable",
2023-12-19 23:09:23 +01:00
"ansible.builtin.command": {
"cmd": "ls -1 /tmp/dokuwiki-plugin-oauth"
2023-12-17 15:07:55 +01:00
},
2023-12-18 08:13:17 +01:00
"register": "temp_plugin_oauth_base_version_output"
2023-12-17 15:07:55 +01:00
},
{
2023-12-19 23:09:23 +01:00
"name": "plugin 'oauth' | directory",
2023-12-18 08:13:17 +01:00
"when": "var_dokuwiki_oauth2_enable",
"become": true,
"ansible.builtin.file": {
"state": "directory",
"dest": "{{var_dokuwiki_directory}}/lib/plugins/oauth",
"owner": "www-data"
}
},
{
2023-12-19 23:09:23 +01:00
"name": "plugin 'oauth' | emplacement",
2023-12-18 08:13:17 +01:00
"when": "var_dokuwiki_oauth2_enable",
2023-12-17 15:07:55 +01:00
"become": true,
"ansible.builtin.copy": {
"remote_src": true,
2023-12-19 23:09:23 +01:00
"src": "/tmp/dokuwiki-plugin-oauth/{{temp_plugin_oauth_base_version_output.stdout}}/",
2023-12-18 08:13:17 +01:00
"dest": "{{var_dokuwiki_directory}}/lib/plugins/oauth",
"owner": "www-data"
}
},
{
2023-12-19 23:09:23 +01:00
"name": "plugin 'oauthgeneric' | preparation",
"ansible.builtin.file": {
"state": "directory",
"path": "/tmp/dokuwiki-plugin-oauthgeneric"
}
},
{
"name": "plugin 'oauthgeneric' | acquisition",
2023-12-18 08:13:17 +01:00
"when": "var_dokuwiki_oauth2_enable",
"ansible.builtin.get_url": {
"url": "https://github.com/cosmocode/dokuwiki-plugin-oauthgeneric/zipball/master",
"dest": "/tmp/dokuwiki-plugin-oauth-generic.zip"
}
},
{
2023-12-19 23:09:23 +01:00
"name": "plugin 'oauthgeneric' | extraction",
2023-12-18 08:13:17 +01:00
"when": "var_dokuwiki_oauth2_enable",
"ansible.builtin.unarchive": {
"remote_src": true,
"src": "/tmp/dokuwiki-plugin-oauth-generic.zip",
2023-12-19 23:09:23 +01:00
"dest": "/tmp/dokuwiki-plugin-oauthgeneric"
2023-12-18 08:13:17 +01:00
}
},
{
2023-12-19 23:09:23 +01:00
"name": "plugin 'oauthgeneric' | version retrieval",
2023-12-18 08:13:17 +01:00
"when": "var_dokuwiki_oauth2_enable",
2023-12-19 23:09:23 +01:00
"ansible.builtin.command": {
"cmd": "ls -1 /tmp/dokuwiki-plugin-oauthgeneric"
2023-12-18 08:13:17 +01:00
},
"register": "temp_plugin_oauth_generic_version_output"
},
{
2023-12-19 23:09:23 +01:00
"name": "plugin 'oauthgeneric' | directory",
2023-12-18 08:13:17 +01:00
"when": "var_dokuwiki_oauth2_enable",
"become": true,
"ansible.builtin.file": {
2023-12-17 15:07:55 +01:00
"state": "directory",
2023-12-18 08:13:17 +01:00
"dest": "{{var_dokuwiki_directory}}/lib/plugins/oauthgeneric",
2023-12-17 15:07:55 +01:00
"owner": "www-data"
}
},
{
2023-12-19 23:09:23 +01:00
"name": "plugin 'oauthgeneric' | emplacement",
2023-12-18 08:13:17 +01:00
"when": "var_dokuwiki_oauth2_enable",
"become": true,
"ansible.builtin.copy": {
"remote_src": true,
2023-12-19 23:09:23 +01:00
"src": "/tmp/dokuwiki-plugin-oauthgeneric/{{temp_plugin_oauth_generic_version_output.stdout}}/",
2023-12-18 08:13:17 +01:00
"dest": "{{var_dokuwiki_directory}}/lib/plugins/oauthgeneric",
"owner": "www-data"
}
},
{
2023-12-19 23:09:23 +01:00
"name": "admin user password",
2023-12-18 08:13:17 +01:00
"when": "var_dokuwiki_admin_user_define",
2023-12-18 08:40:46 +01:00
"ansible.builtin.set_fact": {
2024-03-21 23:43:20 +01:00
"temp_password_hash": "{{var_dokuwiki_admin_user_password | ansible.builtin.password_hash(hashtype='sha512')}}"
2023-12-18 08:13:17 +01:00
}
},
{
"name": "configuration | local",
"become": true,
"ansible.builtin.template": {
"src": "conf-local.php.j2",
2023-12-19 23:33:31 +01:00
"dest": "{{var_dokuwiki_directory}}/conf/local.php",
"owner": "www-data"
2023-12-18 08:13:17 +01:00
}
},
{
"name": "configuration | plugins",
"become": true,
"ansible.builtin.template": {
"src": "conf-plugins.local.php.j2",
2023-12-19 23:33:31 +01:00
"dest": "{{var_dokuwiki_directory}}/conf/plugins.local.php",
"owner": "www-data"
2023-12-18 08:13:17 +01:00
}
},
{
"name": "configuration | acl",
"become": true,
"ansible.builtin.template": {
"src": "conf-acl.auth.php.j2",
2023-12-19 23:33:31 +01:00
"dest": "{{var_dokuwiki_directory}}/conf/acl.auth.php",
"owner": "www-data"
2023-12-18 08:13:17 +01:00
}
},
{
"name": "configuration | users",
2023-12-17 15:07:55 +01:00
"become": true,
"ansible.builtin.template": {
2023-12-18 08:13:17 +01:00
"src": "conf-users.auth.php.j2",
2023-12-19 23:33:31 +01:00
"dest": "{{var_dokuwiki_directory}}/conf/users.auth.php",
"owner": "www-data"
2023-12-17 15:07:55 +01:00
}
}
]