mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	Update wordpress/tasks/main.yml
This commit is contained in:
		
							parent
							
								
									05e65614a0
								
							
						
					
					
						commit
						1358d5968f
					
				
					 1 changed files with 8 additions and 7 deletions
				
			
		|  | @ -4,7 +4,7 @@ | |||
| # I want to perform input validation for Ansible playbooks" | ||||
| # https://stackoverflow.com/questions/46664127/how-do-i-fail-a-task-in-ansible-if-the-variable-contains-a-boolean-value-i-want/46667499#46667499 | ||||
| 
 | ||||
| # If 0-init/tasks/validate_vars.yml has DEFINITELY been run (?) perhaps no need | ||||
| # We assume 0-init/tasks/validate_vars.yml has DEFINITELY been run, so no need | ||||
| # to re-check whether vars are defined here.  As Ansible vars cannot be unset: | ||||
| # https://serverfault.com/questions/856729/how-to-destroy-delete-unset-a-variable-value-in-ansible | ||||
| 
 | ||||
|  | @ -13,16 +13,12 @@ | |||
|     that: wordpress_install is sameas true | ||||
|     fail_msg: "PLEASE SET 'wordpress_install: True' e.g. IN: /etc/iiab/local_vars.yml" | ||||
|     quiet: yes | ||||
|     #that: wordpress_install is defined and wordpress_install is sameas true | ||||
|     #success_msg: wordpress_install is defined and wordpress_install is sameas true | ||||
| 
 | ||||
| - name: Assert that "wordpress_enabled | type_debug == 'bool'" (boolean not string etc) | ||||
|   assert: | ||||
|     that: wordpress_enabled | type_debug == 'bool' | ||||
|     fail_msg: "PLEASE GIVE VARIABLE 'wordpress_enabled' A PROPER (UNQUOTED) BOOLEAN VALUE e.g. IN: /etc/iiab/local_vars.yml" | ||||
|     quiet: yes | ||||
|     #that: wordpress_enabled is defined and wordpress_enabled | type_debug == 'bool' | ||||
|     #success_msg: wordpress_enabled is defined and wordpress_enabled | type_debug == 'bool' | ||||
| 
 | ||||
| - name: Provision MySQL DB for WordPress, if 'wordpress_installed' is not defined in {{ iiab_state_file }}    # /etc/iiab/iiab_state.yml | ||||
|   include_tasks: setup.yml | ||||
|  | @ -32,8 +28,13 @@ | |||
|   include_tasks: install.yml | ||||
|   when: wordpress_installed is undefined | ||||
| 
 | ||||
| - name: Enable or Disable WordPress | ||||
|   include_tasks: enable-or-disable.yml | ||||
| - name: Enable/Disable/Restart Apache if primary | ||||
|   include_tasks: apache.yml | ||||
|   when: not nginx_enabled | ||||
| 
 | ||||
| - name: Enable/Disable/Restart NGINX if primary | ||||
|   include_tasks: nginx.yml | ||||
|   when: nginx_enabled | bool | ||||
| 
 | ||||
| - name: Add 'wordpress' variable values to {{ iiab_ini_file }} | ||||
|   ini_file: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue