From 5d93cf890be4d5efcb87870ffa2237f59d085464 Mon Sep 17 00:00:00 2001 From: taozhengming Date: Wed, 8 Feb 2017 15:11:51 +0800 Subject: [PATCH] Add wordpress root access flag When a cloud image only has root user, deploy wordpress will fail without the flag since wordpress by default does not allow root user to deploy artifacts. Adding this flag will allow root and non root users to be used to deploy wordpress Change-Id: Icf0a62bdfc5db5d0e14752908477288516143eb9 --- .../shade/lampstack/roles/wordpress/tasks/ubuntu.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/workloads/ansible/shade/lampstack/roles/wordpress/tasks/ubuntu.yml b/workloads/ansible/shade/lampstack/roles/wordpress/tasks/ubuntu.yml index 783729a..eb2cddd 100755 --- a/workloads/ansible/shade/lampstack/roles/wordpress/tasks/ubuntu.yml +++ b/workloads/ansible/shade/lampstack/roles/wordpress/tasks/ubuntu.yml @@ -18,6 +18,7 @@ --admin_user=wpuser --admin_password="{{ db_pass }}" --admin_email='interop@openstack.org' + --allow-root when: hostvars.cloud.balancer.openstack.public_v4 != "" - name: Install wordpress @@ -28,11 +29,12 @@ --admin_user=wpuser --admin_password="{{ db_pass }}" --admin_email='interop@openstack.org' + --allow-root when: hostvars.cloud.balancer.openstack.public_v4 == "" - name: Install package for automated plugin activation shell: > - wp package install itspriddle/wp-cli-tgmpa-plugin + wp package install itspriddle/wp-cli-tgmpa-plugin --allow-root - name: Make an initial request, so that later switch-theme hooks work. shell: > @@ -41,7 +43,7 @@ - name: Activate wordpress theme command: > - wp --path=/var/www/html theme activate superuser + wp --path=/var/www/html theme activate superuser --allow-root - name: Install and activate required plugins shell: > @@ -81,7 +83,7 @@ - name: Import wordpress posts command: > - wp --path=/var/www/html import /tmp/posts/superuser_content.xml --authors=create --quiet + wp --path=/var/www/html import /tmp/posts/superuser_content.xml --authors=create --quiet --allow-root - name: Regenerate thumbnails for the imported posts shell: >