dokuwiki: find installed PHP version without running commands
So that it works in check mode.
This commit is contained in:
		
							parent
							
								
									ce80765560
								
							
						
					
					
						commit
						3b246447cf
					
				
					 1 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
					@ -2,14 +2,12 @@
 | 
				
			||||||
  package:
 | 
					  package:
 | 
				
			||||||
    name: acl,php,php-fpm
 | 
					    name: acl,php,php-fpm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Find PHP package
 | 
					- name: Get installed packages
 | 
				
			||||||
  command: apk info -e php
 | 
					  package_facts:
 | 
				
			||||||
  register: php_package
 | 
					 | 
				
			||||||
  changed_when: false
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Set PHP version
 | 
					- name: Set PHP version
 | 
				
			||||||
  set_fact:
 | 
					  set_fact:
 | 
				
			||||||
    php_version: "{{ php_package.stdout | regex_search('[0-9.]+') }}"
 | 
					    php_version: "{{ ansible_facts.packages | select('match', '^php[0-9]+$') | first | replace('php', '') }}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Set PHP-FPM settings
 | 
					- name: Set PHP-FPM settings
 | 
				
			||||||
  lineinfile:
 | 
					  lineinfile:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue