Browse Source

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
taozhengming 2 years ago
parent
commit
5d93cf890b

+ 5
- 3
workloads/ansible/shade/lampstack/roles/wordpress/tasks/ubuntu.yml View File

@@ -18,6 +18,7 @@
18 18
     --admin_user=wpuser
19 19
     --admin_password="{{ db_pass }}"
20 20
     --admin_email='interop@openstack.org'
21
+    --allow-root
21 22
   when: hostvars.cloud.balancer.openstack.public_v4 != ""
22 23
 
23 24
 - name: Install wordpress
@@ -28,11 +29,12 @@
28 29
     --admin_user=wpuser
29 30
     --admin_password="{{ db_pass }}"
30 31
     --admin_email='interop@openstack.org'
32
+    --allow-root
31 33
   when: hostvars.cloud.balancer.openstack.public_v4 == ""
32 34
 
33 35
 - name: Install package for automated plugin activation
34 36
   shell: >
35
-    wp package install itspriddle/wp-cli-tgmpa-plugin
37
+    wp package install itspriddle/wp-cli-tgmpa-plugin --allow-root
36 38
 
37 39
 - name: Make an initial request, so that later switch-theme hooks work.
38 40
   shell: >
@@ -41,7 +43,7 @@
41 43
 
42 44
 - name: Activate wordpress theme
43 45
   command: >
44
-    wp --path=/var/www/html theme activate superuser
46
+    wp --path=/var/www/html theme activate superuser --allow-root
45 47
 
46 48
 - name: Install and activate required plugins
47 49
   shell: >
@@ -81,7 +83,7 @@
81 83
 
82 84
 - name: Import wordpress posts
83 85
   command: >
84
-    wp --path=/var/www/html import /tmp/posts/superuser_content.xml --authors=create --quiet
86
+    wp --path=/var/www/html import /tmp/posts/superuser_content.xml --authors=create --quiet --allow-root
85 87
 
86 88
 - name: Regenerate thumbnails for the imported posts
87 89
   shell: >

Loading…
Cancel
Save