Advertisement
QualibreInfo

confapache tasks

Jan 9th, 2022
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.29 KB | None | 0 0
  1. ---
  2.  
  3. - name: "mediawiki directory"
  4.   file:
  5.     path: "{{mediawiki_directory}}"
  6.     owner: "apache"
  7.     group: "apache"
  8.     state: directory
  9.  
  10. - name: "uncompress mediawiki archive"
  11.   unarchive:
  12.     src: "{{mediawiki_archive_url}}"
  13.     dest: "{{mediawiki_directory}}"
  14.     owner: "apache"
  15.     group: "apache"
  16.     remote_src: yes
  17.     extra_opts: --transform=s/mediawiki-[0-9\.]*\///
  18.  
  19. - name: "mediawiki configuration"
  20.   become: yes
  21.   become_user: "apache"
  22.   args:
  23.     creates: "{{mediawiki_directory}}/LocalSettings.php"
  24.     chdir: "{{mediawiki_maintenance_directory}}"
  25.   command:
  26.    php install.php --scriptpath /{{mediawiki_name}}
  27.       --server https://{{ user.slug }}-http2.qualibre-formations.fr
  28.       --dbname mediawiki --lang fr
  29.       --dbuser {{mediawiki_db_user}}
  30.       --dbpass {{mediawiki_db_password}}
  31.       --pass {{mediawiki_admin_password}}
  32.       --dbserver {{mediawiki_db_host}}  
  33.       {{mediawiki_title}} {{mediawiki_admin_user}}
  34.   run_once: yes
  35.   delegate_to: "{{item}}"
  36.   with_items: "{{groups.apache}}"
  37.  
  38. - name: "mediawiki db update"
  39.   become: yes
  40.   become_user: "apache"
  41.   command:
  42.    php update.php --quick
  43.   args:
  44.     chdir: "{{mediawiki_maintenance_directory}}"
  45.   run_once: yes
  46.   register: update_result
  47.   changed_when: "' ...done.' in update_result.stdout"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement