Obtaining php-fpm pool directory status and creating only if the directory does not exist

This commit is contained in:
Rob Ruma 2016-04-11 19:47:48 -04:00
parent 6c7c0ab9b7
commit a9441fda34

View File

@ -9,7 +9,12 @@
php_fpm_pool_conf_path: "{{ __php_fpm_pool_conf_path }}"
when: php_fpm_pool_conf_path is not defined
- name: Obtain status of {{ php_fpm_pool_conf_path | dirname }}
stat: path={{ php_fpm_pool_conf_path | dirname }}
register: php_fpm_pool_conf_path_dir_stat
- name: Ensure the default pool directory exists.
when: php_fpm_pool_conf_path_dir_stat.stat.islnk is not defined
file:
path: "{{ php_fpm_pool_conf_path | dirname }}"
state: directory