mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	Readability revisions
This commit is contained in:
		
							parent
							
								
									743c91de8c
								
							
						
					
					
						commit
						04a045a66b
					
				
					 1 changed files with 11 additions and 12 deletions
				
			
		| 
						 | 
					@ -1,17 +1,17 @@
 | 
				
			||||||
- name: Get the WordPress software
 | 
					- name: Get the WordPress software
 | 
				
			||||||
  get_url: url="{{ wordpress_download_base_url }}/{{ wordpress_src }}"  dest={{ downloads_dir }}/
 | 
					  get_url: url="{{ wordpress_download_base_url }}/{{ wordpress_src }}" dest={{ downloads_dir }}/
 | 
				
			||||||
  register: wp_download_output
 | 
					  register: wp_download_output
 | 
				
			||||||
  when: internet_available
 | 
					  when: internet_available
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Copy it to permanent location /library
 | 
					- name: Copy it to permanent location /library
 | 
				
			||||||
  unarchive: src={{ wp_download_output.dest }}  dest=/library
 | 
					  unarchive: src={{ wp_download_output.dest }} dest=/library
 | 
				
			||||||
  when: internet_available
 | 
					  when: internet_available
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Rename /library/wordpress* to /library/wordpress
 | 
					- name: Rename /library/wordpress* to /library/wordpress
 | 
				
			||||||
  shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi
 | 
					  shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# First pass at permissions and ownership
 | 
					# First pass at permissions and ownership
 | 
				
			||||||
- name: Make apache owner and group
 | 
					- name: Make Apache owner and group
 | 
				
			||||||
  file: path={{ wp_abs_path }}
 | 
					  file: path={{ wp_abs_path }}
 | 
				
			||||||
        recurse=yes
 | 
					        recurse=yes
 | 
				
			||||||
        owner=root
 | 
					        owner=root
 | 
				
			||||||
| 
						 | 
					@ -19,7 +19,7 @@
 | 
				
			||||||
        mode=0664
 | 
					        mode=0664
 | 
				
			||||||
        state=directory
 | 
					        state=directory
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Make directories 775 so apache can traverse and write
 | 
					- name: Make directories 775 so Apache can traverse and write
 | 
				
			||||||
  command: "/usr/bin/find {{ wp_abs_path }} -type d -exec chmod 775 {} +"
 | 
					  command: "/usr/bin/find {{ wp_abs_path }} -type d -exec chmod 775 {} +"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Copy wp salt values
 | 
					- name: Copy wp salt values
 | 
				
			||||||
| 
						 | 
					@ -45,15 +45,15 @@
 | 
				
			||||||
  file: path=/tmp/get-iiab-wp-salts
 | 
					  file: path=/tmp/get-iiab-wp-salts
 | 
				
			||||||
        state=absent
 | 
					        state=absent
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: mysql database needs to be running if we are trying to create a new db
 | 
					- name: MySQL database needs to be running if we are trying to create a new db
 | 
				
			||||||
  service: state=started
 | 
					  service: state=started
 | 
				
			||||||
           name='{{ mysql_service }}'
 | 
					           name='{{ mysql_service }}'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Create mysql wordpress database
 | 
					- name: Create MySQL wordpress database
 | 
				
			||||||
  mysql_db: name={{ wp_db_name }}
 | 
					  mysql_db: name={{ wp_db_name }}
 | 
				
			||||||
            state=present
 | 
					            state=present
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Create mysql wordpress database user
 | 
					- name: Create MySQL wordpress database user
 | 
				
			||||||
  mysql_user: name={{ wp_db_user }}
 | 
					  mysql_user: name={{ wp_db_user }}
 | 
				
			||||||
              password={{ wp_db_user_password }}
 | 
					              password={{ wp_db_user_password }}
 | 
				
			||||||
              priv={{ wp_db_name }}.*:ALL,GRANT
 | 
					              priv={{ wp_db_name }}.*:ALL,GRANT
 | 
				
			||||||
| 
						 | 
					@ -70,22 +70,21 @@
 | 
				
			||||||
  template: src=wordpress.conf.j2
 | 
					  template: src=wordpress.conf.j2
 | 
				
			||||||
            dest=/etc/{{ apache_config_dir }}/wordpress.conf
 | 
					            dest=/etc/{{ apache_config_dir }}/wordpress.conf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Enable httpd conf file if we are disabled
 | 
					- name: Enable httpd conf file if we are disabled (debuntu)
 | 
				
			||||||
  file: path=/etc/apache2/sites-enabled/wordpress.conf
 | 
					  file: path=/etc/apache2/sites-enabled/wordpress.conf
 | 
				
			||||||
        src=/etc/apache2/sites-available/wordpress.conf
 | 
					        src=/etc/apache2/sites-available/wordpress.conf
 | 
				
			||||||
        state=link
 | 
					        state=link
 | 
				
			||||||
  when: wordpress_enabled and is_debuntu
 | 
					  when: wordpress_enabled and is_debuntu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: Remove httpd conf file if we are disabled (OS's other than debuntu)
 | 
				
			||||||
- name: Remove httpd conf file if we are disabled
 | 
					 | 
				
			||||||
  file: path=/etc/apache2/sites-enabled/wordpress.conf
 | 
					  file: path=/etc/apache2/sites-enabled/wordpress.conf
 | 
				
			||||||
        state=absent
 | 
					        state=absent
 | 
				
			||||||
  when: not wordpress_enabled and is_debuntu
 | 
					  when: not wordpress_enabled and is_debuntu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Restart apache, so it picks up the new aliases
 | 
					- name: Restart Apache, so it picks up the new aliases
 | 
				
			||||||
  service: name={{ apache_service }} state=restarted
 | 
					  service: name={{ apache_service }} state=restarted
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Add wordpress to service list
 | 
					- name: Add 'wordpress' to service list
 | 
				
			||||||
  ini_file: dest='{{ service_filelist }}'
 | 
					  ini_file: dest='{{ service_filelist }}'
 | 
				
			||||||
            section=wordpress
 | 
					            section=wordpress
 | 
				
			||||||
            option='{{ item.option }}'
 | 
					            option='{{ item.option }}'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue