Skip to content

Commit

Permalink
Merge branch 'hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
thingsym committed May 16, 2022
2 parents 30acbfb + 64a4167 commit 80fc6f5
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 24 deletions.
3 changes: 2 additions & 1 deletion roles/after-command/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
command: /vagrant/command/after_provision.sh
when: after_command.stat.exists

- block:
- name: sync-dir
block:
- name: stat after_provision.sh
stat:
path: /vagrant/command/after_provision.sh
Expand Down
3 changes: 2 additions & 1 deletion roles/before-command/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
command: /vagrant/command/before_provision.sh
when: before_command.stat.exists

- block:
- name: sync-dir
block:
- name: stat before_provision.sh
stat:
path: /vagrant/command/before_provision.sh
Expand Down
6 changes: 4 additions & 2 deletions roles/common/tasks/reset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
ignore_errors: yes
when: database != 'mysql'

- block:
- name: mariadb
block:
- name: removed MariaDB
package:
name: MariaDB*
Expand All @@ -72,7 +73,8 @@
state: absent
when: database != 'mariadb'

- block:
- name: mariadb
block:
- name: removed Percona
package:
name: Percona*
Expand Down
3 changes: 2 additions & 1 deletion roles/percona/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
enabled: yes
when: ansible_os_family == 'Debian'

- block:
- name: RedHat 5.7
block:
- name: get temporary password from mysqld.log
shell: cat /var/log/mysql/mysqld.log | grep "temporary password" | awk '{print $11}'
register: mysql_temp_password
Expand Down
6 changes: 4 additions & 2 deletions roles/percona/tasks/percona-5.6.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- block:
- name: RedHat
block:
- name: percona repository installed (CentOS/RHEL)
yum:
name: http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
Expand All @@ -16,7 +17,8 @@
state: latest
when: ansible_os_family == 'RedHat'

- block:
- name: Debian
block:
- name: percona-release repository installed (Debian)
apt:
deb: "https://repo.percona.com/apt/percona-release_latest.{{ ansible_distribution_release }}_all.deb"
Expand Down
6 changes: 4 additions & 2 deletions roles/percona/tasks/percona-5.7.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- block:
- name: RedHat
block:
- name: percona repository installed (CentOS/RHEL)
yum:
name: https://repo.percona.com/yum/percona-release-latest.noarch.rpm
Expand Down Expand Up @@ -36,7 +37,8 @@

when: ansible_os_family == 'RedHat'

- block:
- name: Debian
block:
- name: percona-release repository installed (Debian)
apt:
deb: "https://repo.percona.com/apt/percona-release_latest.{{ ansible_distribution_release }}_all.deb"
Expand Down
6 changes: 4 additions & 2 deletions roles/percona/tasks/percona-8.0.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- block:
- name: RedHat
block:
- name: percona repository installed (CentOS/RHEL)
yum:
name: https://repo.percona.com/yum/percona-release-latest.noarch.rpm
Expand Down Expand Up @@ -33,7 +34,8 @@

when: ansible_os_family == 'RedHat'

- block:
- name: Debian
block:
- name: percona-release repository installed (Debian)
apt:
deb: "https://repo.percona.com/apt/percona-release_latest.{{ ansible_distribution_release }}_all.deb"
Expand Down
3 changes: 2 additions & 1 deletion roles/wordpress-develop/tasks/daemonize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
failed_when: false
changed_when: false

- block:
- name: daemonize installed
block:
- name: get daemonize archive
get_url:
url: /~https://github.com/bmc/daemonize/archive/release-1.7.8.zip
Expand Down
3 changes: 2 additions & 1 deletion roles/wordpress-develop/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
- include_tasks: wrk.yml
- include_tasks: mysqltuner.yml

- block:
- name: sync-dir
block:
- include_tasks: opcache-viewer.yml
- include_tasks: webgrind.yml
tags: sync-dir
9 changes: 6 additions & 3 deletions roles/wordpress/tasks/import-backwpup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
path: "{{ import_backwpup.path }}"
register: is_import_backwpup

- block:
- name: exists is_import_backwpup
block:
- name: mkdir /tmp/backwpup
file:
path: /tmp/backwpup
Expand All @@ -21,7 +22,8 @@
path: "/tmp/backwpup/{{ import_backwpup.db_data_file }}"
register: is_db_data_file

- block:
- name: exists is_db_data_file
block:
- name: database rest
command: wp --path={{ WP_PATH }} db reset --yes
become: yes
Expand All @@ -44,7 +46,8 @@
path: "/tmp/backwpup/{{ import_backwpup.xml_data_file }}"
register: is_xml_data_file

- block:
- name: exists is_xml_data_file
block:
- name: database rest
command: wp --path={{ WP_PATH }} db reset --yes
become: yes
Expand Down
5 changes: 3 additions & 2 deletions roles/wordpress/tasks/import-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
path: "{{ import_db_data }}"
register: is_db_import

- block:
- name: import db data
block:
- name: database rest
command: wp --path={{ WP_PATH }} db reset --yes
become: yes
become_user: vagrant

- name: db data import
- name: import db data
command: wp --path={{ WP_PATH }} db import {{ import_db_data }}
become: yes
become_user: vagrant
Expand Down
3 changes: 2 additions & 1 deletion roles/wordpress/tasks/import-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
path: "/tmp/theme-unit-test-data.xml"
register: is_unit_test

- block:
- name: import theme-unit-test-data.xml
block:
- name: plugin install wordpress-importer
command: wp --path={{ WP_PATH }} plugin install wordpress-importer --activate
become: yes
Expand Down
7 changes: 4 additions & 3 deletions roles/wordpress/tasks/import-xml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
path: "{{ import_xml_data }}"
register: is_xml_import

- block:
- name: import xml data
block:
- name: database rest
command: wp --path={{ WP_PATH }} db reset --yes
become: yes
Expand All @@ -26,6 +27,6 @@
become_user: vagrant
when:
- is_xml_import.stat.exists
- is_xml_import.stat.isdir == false
- not is_xml_import.stat.isdir
- import_db_data == ''
- theme_unit_test == false
- not theme_unit_test
3 changes: 2 additions & 1 deletion roles/wordpress/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@
replace: "// define( 'FORCE_SSL_LOGIN', true );\ndefine( 'FORCE_SSL_ADMIN', true );\n\n/* That"
when: ssl

- block:
- name: subdirectory install
block:
- name: change wp option for subdirectory install
command: wp --path={{ WP_PATH }} option update siteurl 'http://{{ HOSTNAME }}{{ wp_dir }}'
become: yes
Expand Down
3 changes: 2 additions & 1 deletion roles/wordpress/tasks/options.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- block:
- name: permalink structure
block:
- name: set permalink structure
command: wp --path={{ WP_PATH }} rewrite structure {{ permalink_structure.structure }} --hard
become: yes
Expand Down

0 comments on commit 80fc6f5

Please sign in to comment.