mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	Merge pull request #296 from iiab/holta-wordpress-direct-download
Downloads latest WordPress directly from https://wordpress.org/latest.tar.gz whereupon Ansible's get_url renames it correctly to the actual WordPress version saved into /opt/iiab/downloads (e.g. wordpress-4.8.2.tar.gz) Thanks @tim-moody who provided me Ansible syntax "register: wp_download_output" to capture this dynamic filename that cannot be predicted in advance month-by-month...and then moves that file into position using "unarchive: src={{ wp_download_output.dest }} dest=/library"
This commit is contained in:
		
						commit
						583439b278
					
				
					 2 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
wordpress_src: wordpress-4.8.1.tar.gz
 | 
			
		||||
wordpress_download_base_url: https://wordpress.org
 | 
			
		||||
wordpress_src: latest.tar.gz
 | 
			
		||||
wp_db_name: iiab_wp
 | 
			
		||||
wp_db_user: iiab_wp
 | 
			
		||||
wp_db_user_password: changeme
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,9 +1,10 @@
 | 
			
		|||
- name: Get the WordPress software
 | 
			
		||||
  get_url: url="{{ iiab_download_url }}/{{ wordpress_src }}"  dest={{ downloads_dir}}/
 | 
			
		||||
  get_url: url="{{ wordpress_download_base_url }}/{{ wordpress_src }}"  dest={{ downloads_dir}}/
 | 
			
		||||
  register: wp_download_output
 | 
			
		||||
  when: internet_available 
 | 
			
		||||
 | 
			
		||||
- name: Copy it to permanent location /library
 | 
			
		||||
  unarchive: src={{ downloads_dir}}/{{ wordpress_src }}  dest=/library
 | 
			
		||||
  unarchive: src={{ wp_download_output.dest }}  dest=/library
 | 
			
		||||
 | 
			
		||||
- name: Rename /library/wordpress* to /library/wordpress
 | 
			
		||||
  shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue