mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	Permissions / Messaging refined
This commit is contained in:
		
							parent
							
								
									c6a6c374d1
								
							
						
					
					
						commit
						278385d34f
					
				
					 1 changed files with 13 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -33,29 +33,32 @@
 | 
			
		|||
    path: "{{ downloads_dir }}/wordpress.tar.gz"
 | 
			
		||||
  register: wp_link
 | 
			
		||||
 | 
			
		||||
- name: FAIL (force Ansible to exit) if /opt/iiab/downloads/wordpress.tar.gz doesn't exist.
 | 
			
		||||
- name: FAIL (force Ansible to exit) IF /opt/iiab/downloads/wordpress.tar.gz doesn't exist
 | 
			
		||||
  fail:
 | 
			
		||||
    msg: "{{ downloads_dir }}/wordpress.tar.gz is REQUIRED in order to install WordPress."
 | 
			
		||||
  when: not wp_link.stat.exists
 | 
			
		||||
 | 
			
		||||
- name: Unpack /opt/iiab/downloads/wordpress.tar.gz to permanent location /library/wordpress
 | 
			
		||||
- name: "Unpack /opt/iiab/downloads/wordpress.tar.gz to permanent location /library/wordpress - owner: root, group: {{ apache_user }}, mode: 0664"
 | 
			
		||||
  unarchive:
 | 
			
		||||
    src: "{{ downloads_dir }}/wordpress.tar.gz"
 | 
			
		||||
    dest: "{{ wp_install_path }}"
 | 
			
		||||
    owner: root
 | 
			
		||||
    group: "{{ apache_user }}"
 | 
			
		||||
    mode: 0664
 | 
			
		||||
    keep_newer: yes
 | 
			
		||||
 | 
			
		||||
# - name: Rename /library/wordpress* to /library/wordpress
 | 
			
		||||
#   shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi
 | 
			
		||||
 | 
			
		||||
- name: Make Apache owner and group, 1st pass permissions set to 0664
 | 
			
		||||
  file: path={{ wp_abs_path }}
 | 
			
		||||
        recurse=yes
 | 
			
		||||
        owner=root
 | 
			
		||||
        group={{ apache_user }}
 | 
			
		||||
        mode=0664
 | 
			
		||||
        state=directory
 | 
			
		||||
#- name: Make Apache owner and group, 1st pass permissions set to 0664
 | 
			
		||||
#  file: path={{ wp_abs_path }}
 | 
			
		||||
#        recurse=yes
 | 
			
		||||
#        owner=root
 | 
			
		||||
#        group={{ apache_user }}
 | 
			
		||||
#        mode=0664
 | 
			
		||||
#        state=directory
 | 
			
		||||
 | 
			
		||||
- name: Make directories 775 so Apache can traverse and write
 | 
			
		||||
- name: Make directories 775 so Apache can traverse and write (these files remain 0664)
 | 
			
		||||
  command: "/usr/bin/find {{ wp_abs_path }} -type d -exec chmod 775 {} +"
 | 
			
		||||
 | 
			
		||||
- name: Copy wp salt values
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue