185 lines
4.6 KiB
JSON
185 lines
4.6 KiB
JSON
[
|
|
{
|
|
"name": "packages",
|
|
"become": true,
|
|
"ansible.builtin.apt": {
|
|
"pkg": [
|
|
"unzip",
|
|
"php8.2-fpm",
|
|
"php8.2-xml"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"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",
|
|
"dest": "/tmp"
|
|
}
|
|
},
|
|
{
|
|
"name": "core | version retrieval",
|
|
"ansible.builtin.shell": {
|
|
"cmd": "ls -1 /tmp/ | grep dokuwiki- | grep -v plugin"
|
|
},
|
|
"register": "temp_core_version_output"
|
|
},
|
|
{
|
|
"name": "core | directory",
|
|
"become": true,
|
|
"ansible.builtin.file": {
|
|
"state": "directory",
|
|
"path": "{{var_dokuwiki_directory}}",
|
|
"owner": "www-data"
|
|
}
|
|
},
|
|
{
|
|
"name": "core | emplacement",
|
|
"become": true,
|
|
"ansible.builtin.copy": {
|
|
"remote_src": true,
|
|
"src": "/tmp/{{temp_core_version_output.stdout}}/",
|
|
"dest": "{{var_dokuwiki_directory}}",
|
|
"owner": "www-data"
|
|
}
|
|
},
|
|
{
|
|
"name": "plugin oauth2 base | acquisition",
|
|
"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"
|
|
}
|
|
},
|
|
{
|
|
"name": "plugin oauth2 base | extraction",
|
|
"when": "var_dokuwiki_oauth2_enable",
|
|
"ansible.builtin.unarchive": {
|
|
"remote_src": true,
|
|
"src": "/tmp/dokuwiki-plugin-oauth-base.zip",
|
|
"dest": "/tmp"
|
|
}
|
|
},
|
|
{
|
|
"name": "plugin oauth2 base | version retrieval",
|
|
"when": "var_dokuwiki_oauth2_enable",
|
|
"ansible.builtin.shell": {
|
|
"cmd": "ls -1 /tmp/ | grep cosmocode-dokuwiki-plugin-oauth-"
|
|
},
|
|
"register": "temp_plugin_oauth_base_version_output"
|
|
},
|
|
{
|
|
"name": "plugin oauth2 base | directory",
|
|
"when": "var_dokuwiki_oauth2_enable",
|
|
"become": true,
|
|
"ansible.builtin.file": {
|
|
"state": "directory",
|
|
"dest": "{{var_dokuwiki_directory}}/lib/plugins/oauth",
|
|
"owner": "www-data"
|
|
}
|
|
},
|
|
{
|
|
"name": "plugin oauth2 base | emplacement",
|
|
"when": "var_dokuwiki_oauth2_enable",
|
|
"become": true,
|
|
"ansible.builtin.copy": {
|
|
"remote_src": true,
|
|
"src": "/tmp/{{temp_plugin_oauth_base_version_output.stdout}}/",
|
|
"dest": "{{var_dokuwiki_directory}}/lib/plugins/oauth",
|
|
"owner": "www-data"
|
|
}
|
|
},
|
|
{
|
|
"name": "plugin oauth2 generic | acquisition",
|
|
"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"
|
|
}
|
|
},
|
|
{
|
|
"name": "plugin oauth2 generic | extraction",
|
|
"when": "var_dokuwiki_oauth2_enable",
|
|
"ansible.builtin.unarchive": {
|
|
"remote_src": true,
|
|
"src": "/tmp/dokuwiki-plugin-oauth-generic.zip",
|
|
"dest": "/tmp"
|
|
}
|
|
},
|
|
{
|
|
"name": "plugin oauth2 generic | version retrieval",
|
|
"when": "var_dokuwiki_oauth2_enable",
|
|
"ansible.builtin.shell": {
|
|
"cmd": "ls -1 /tmp/ | grep cosmocode-dokuwiki-plugin-oauthgeneric-"
|
|
},
|
|
"register": "temp_plugin_oauth_generic_version_output"
|
|
},
|
|
{
|
|
"name": "plugin oauth2 generic | directory",
|
|
"when": "var_dokuwiki_oauth2_enable",
|
|
"become": true,
|
|
"ansible.builtin.file": {
|
|
"state": "directory",
|
|
"dest": "{{var_dokuwiki_directory}}/lib/plugins/oauthgeneric",
|
|
"owner": "www-data"
|
|
}
|
|
},
|
|
{
|
|
"name": "plugin oauth2 generic | emplacement",
|
|
"when": "var_dokuwiki_oauth2_enable",
|
|
"become": true,
|
|
"ansible.builtin.copy": {
|
|
"remote_src": true,
|
|
"src": "/tmp/{{temp_plugin_oauth_generic_version_output.stdout}}/",
|
|
"dest": "{{var_dokuwiki_directory}}/lib/plugins/oauthgeneric",
|
|
"owner": "www-data"
|
|
}
|
|
},
|
|
{
|
|
"name": "admin user | password hash",
|
|
"when": "var_dokuwiki_admin_user_define",
|
|
"ansible.builtin.set_fact": {
|
|
"temp_password_hash": "{{var_dokuwiki_admin_user_password | ansible.builtin.password_hash(hashtype='blowfish',rounds=10)}}"
|
|
}
|
|
},
|
|
{
|
|
"name": "configuration | local",
|
|
"become": true,
|
|
"ansible.builtin.template": {
|
|
"src": "conf-local.php.j2",
|
|
"dest": "{{var_dokuwiki_directory}}/conf/local.php"
|
|
}
|
|
},
|
|
{
|
|
"name": "configuration | plugins",
|
|
"become": true,
|
|
"ansible.builtin.template": {
|
|
"src": "conf-plugins.local.php.j2",
|
|
"dest": "{{var_dokuwiki_directory}}/conf/plugins.local.php"
|
|
}
|
|
},
|
|
{
|
|
"name": "configuration | acl",
|
|
"become": true,
|
|
"ansible.builtin.template": {
|
|
"src": "conf-acl.auth.php.j2",
|
|
"dest": "{{var_dokuwiki_directory}}/conf/acl.auth.php"
|
|
}
|
|
},
|
|
{
|
|
"name": "configuration | users",
|
|
"become": true,
|
|
"ansible.builtin.template": {
|
|
"src": "conf-users.auth.php.j2",
|
|
"dest": "{{var_dokuwiki_directory}}/conf/users.auth.php"
|
|
}
|
|
}
|
|
]
|