The requested page could not be found.
-This happens when the page has been moved, removed, or had its name and address changed. It might otherwise be temporarily unavailable for technical reasons.
-diff --git a/defaults/main.yml b/defaults/main.yml
index 03f9761..fe7559e 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -78,3 +78,18 @@ httpd_navbar:
- name: "About"
icon: "fas fa-info-circle"
link: "#"
+
+# ===============================================================================
+# Blog theme configuration.
+#
+# Themes are being installed in accumulative way to avoid conflicts between
+# different theme versions (e.g., because files were added or removed). You can
+# switch from one theme version to another using the wordpress graphical user
+# interface, after performing a live preview verification. As new themes are
+# installed, older themes are available as backup mechanism.
+#
+# New theme releases can be found in:
+# - https://gitlab.com/CentOS/artwork/centos-web/wordpress-theme-centos/-/releases
+# ===============================================================================
+wp_theme_name: wordpress-theme-centos
+wp_theme_version: "1.0.16"
diff --git a/tasks/main.yml b/tasks/main.yml
index 52e8f33..28c66a6 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -10,8 +10,8 @@
- include_tasks: selinux.yml
- block:
- - name: Creating mandatory DB
- include_role:
+ - name: Creating mandatory DB
+ include_role:
name: mysql
tasks_from: db_remote
vars:
@@ -21,7 +21,7 @@
mysql_host: "{{ wp_mysql_host }}"
- name: Opening iptables if needed on remote mysql host
- include_role:
+ include_role:
name: iptables
tasks_from: remote-mysqld
vars:
@@ -33,8 +33,8 @@
name: mysql
when: not wp_use_remote_mysql_host
-- name: Creating mandatory (local) DB
- include_role:
+- name: Creating mandatory (local) DB
+ include_role:
name: mysql
tasks_from: db
vars:
@@ -68,8 +68,8 @@
- restart_httpd
with_items:
- ssl-wp-vhost.conf
- when: wp_httpd_tls
-
+ when: wp_httpd_tls
+
- import_role:
name: httpd
tasks_from: pki-tls
@@ -124,7 +124,7 @@
url: https://api.wordpress.org/secret-key/1.1/salt/
return_content: True
when: wp_new_install is changed
- register: wp_api_keys
+ register: wp_api_keys
tags:
- api
@@ -132,7 +132,7 @@
template:
src: wp-config.php.j2
dest: "{{ wp_local_path }}/wp-config.php"
- when: wp_new_install is changed
+ when: wp_new_install is changed
tags:
- config
@@ -141,7 +141,7 @@
src: "https://downloads.wordpress.org/plugin/{{ item.name }}.{{ item.version }}.zip"
remote_src: yes
dest: "{{ wp_local_path | default('/var/www/wordpress') }}/wp-content/plugins/"
- with_items: "{{ wp_plugins }}"
+ with_items: "{{ wp_plugins }}"
tags:
- plugins
@@ -155,50 +155,28 @@
template:
src: fedora-autologin.php.j2
dest: "{{ wp_local_path | default('/var/www/wordpress') }}/wp-content/plugins/fedora-autologin/fedora-autologin.php"
- when: wp_openid_redirect
+ when: wp_openid_redirect
- name: Ensuring centos theme directory exists
file:
- path: "{{ wp_local_path | default('/var/www/wordpress') }}/wp-content/themes/{{ item }}/"
+ path: "{{ wp_local_path | default('/var/www/wordpress') }}/wp-content/themes/{{ wp_theme_name}}-{{ wp_theme_version }}/"
state: directory
- with_items:
- - centos
- - centos/includes
- tags: theme
-
-- name: Update theme files
- template:
- src: "{{ item }}"
- dest: "{{ wp_local_path | default('/var/www/wordpress') }}/wp-content/themes/centos/{{ item | basename }}"
- with_fileglob:
- - "templates/theme/*.php"
- - "templates/theme/*.css"
- tags: theme
-
-- name: Update theme includes
- template:
- src: "{{ item }}"
- dest: "{{ wp_local_path | default('/var/www/wordpress') }}/wp-content/themes/centos/includes/{{ item | basename }}"
- with_fileglob:
- - "templates/theme/includes/*.php"
tags: theme
-- name: Update theme screenshot
- copy:
- src: "{{ item }}"
- dest: "{{ wp_local_path | default('/var/www/wordpress') }}/wp-content/themes/centos/{{ item | basename }}"
- with_fileglob:
- - "templates/theme/screenshot.png"
+- name: Update centos theme files
+ unarchive:
+ src: "https://gitlab.com/api/v4/projects/CentOS%2Fartwork%2Fcentos-web%2F{{ wp_theme_name }}/packages/generic/release/{{ wp_theme_version }}/{{ wp_theme_name }}.zip"
+ dest: "{{ wp_local_path | default('/var/www/wordpress') }}/wp-content/themes/{{ wp_theme_name}}-{{ wp_theme_version }}/"
+ remote_src: true
tags: theme
- name: Ensuring backup user and jobs
include_role:
name: centos-backup
tasks_from: client
-
+
- include_role:
name: postfix
tasks_from: relay_to
vars:
- postfix_relay_to: True
-
+ postfix_relay_to: True
diff --git a/templates/theme/404.php b/templates/theme/404.php
deleted file mode 100755
index 1464e52..0000000
--- a/templates/theme/404.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
- Page not found :(404
-
The requested page could not be found.
-This happens when the page has been moved, removed, or had its name and address changed. It might otherwise be temporarily unavailable for technical reasons.
-Archives
-Categories
-
- ' . get_the_title() . '' ); - ?> -
- -- 'ol', - 'short_ping' => true, - 'avatar_size' => 74, - ) ); - ?> -
- - 1 && get_option( 'page_comments' ) ) : - ?> - - - - - - - - - - - -