Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: "mediawiki directory"
- file:
- path: "{{mediawiki_directory}}"
- owner: "{{ web_user }}"
- group: "{{ web_group }}"
- state: directory
- - name: "uncompress mediawiki archive"
- unarchive:
- src: "{{mediawiki_archive_url}}"
- dest: "{{mediawiki_directory}}"
- owner: "{{ web_user }}"
- group: "{{ web_group }}"
- remote_src: yes
- extra_opts: --transform=s/mediawiki-[0-9\.]*\///
- - name: Ensure acl is installed before using an unprivileged user
- package:
- name: acl,git
- state: latest
- - name: "mediawiki configuration"
- become: yes
- become_user: "{{ web_user }}"
- args:
- creates: "{{mediawiki_directory}}/LocalSettings.php"
- chdir: "{{mediawiki_maintenance_directory}}"
- command:
- php install.php --scriptpath /{{mediawiki_name}}
- --server https://{{ user.slug }}-http2.qualibre-formations.fr
- --dbname mediawiki --lang fr
- --dbuser {{mediawiki_db_user}}
- --dbpass {{mediawiki_db_password}}
- --pass {{mediawiki_admin_password}}
- --dbserver {{mediawiki_db_host}}
- {{mediawiki_title}} {{mediawiki_admin_user}}
- run_once: yes
- delegate_to: "{{item}}"
- with_items: "{{groups.apache}}"
- - name: "mediawiki db update"
- become: yes
- become_user: "{{ web_user }}"
- command:
- php update.php --quick
- args:
- chdir: "{{mediawiki_maintenance_directory}}"
- run_once: yes
- register: update_result
- changed_when: "' ...done.' in update_result.stdout"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement