Commit 1ec135a1 authored by okhin's avatar okhin 🚴

Addthemes, extensions, usersans superuser management:

parent ba697a7d
......@@ -58,5 +58,56 @@
register: wordpress_dbupdate
changed_when: wordpress_dbupdate.rc >= 1
- name: vérification des thèmes installés
command: "php {{ wordpress_wpcli_path }} theme is-installed {{ item }} --path={{ wordpress_path }}"
register: wordpress_installed_themes
changed_when: wordpress_installed_themes.rc >= 1
loop: "{{ wordpress_themes }}"
- name: installer les thèmes manquants
when: wordpress_installed_themes.changed
command: "php {{ wordpress_wpcli_path }} theme install {{ item }} --path={{ wordpress_path }}"
loop: "{{ wordpress_installed_themes.results }}"
when: item.rc >= 1
- name: mets à jour les thèmes
command: "php {{ wordpress_wpcli_path }} theme update {{ item }} --path={{ wordpress_path }}"
loop: "{{ wordpress_themes }}"
register: wordpress_updated_themes
changed_when: wordpress_updated_themes.rc >= 1
- name: vérification des plugins installés
command: "php {{ wordpress_wpcli_path }} plugin is-installed {{ item.name }} --path={{ wordpress_path }}"
register: wordpress_installed_plugins
changed_when: wordpress_installed_plugins.rc >= 1
loop: "{{ wordpress_plugins }}"
- name: installer les plugins manquants
when: wordpress_installed_plugins.changed
command: "php {{ wordpress_wpcli_path }} plugin install {{ item.name }} --path={{ wordpress_path }}"
loop: "{{ wordpress_installed_plugins.results }}"
when: item.rc >= 1
- name: mets à jour les plugins
command: "php {{ wordpress_wpcli_path }} plugin update {{ item.name }} --path={{ wordpress_path }}"
loop: "{{ wordpress_plugins }}"
register: wordpress_updated_plugins
changed_when: wordpress_updated_plugins.rc >= 1
- name: active les plugins pour le multisite
command: "php {{ wordpress_wpcli_path }} plugin activate {{ item.name }} --network --path={{ wordpress_path}}"
loop: "{{ wordpress_plugins }}"
when: item.network_activated
register: wordpress_network_activated_plugins
changed_when: wordpress_network_activated_plugins.rc >= 1
- name: créé les utilisateurs
loop: "{{ wordpress_users }}"
command: "php {{ wordpress_wpcli_path }} user create '{{ item.name }}' {{ item.email }} --send-email --role={{item.role}} --path={{ wordpress_path }}"
- name: donne à {{ item }} les droits superadmin
loop: "{{ wordpress_superusers }}"
command: "php {{ wordpress_wpcli_path }} super-admin add {{ item }} --path={{ wordpress_path }}"
become: yes
become_user: "{{ wordpress_unix_user }}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment