Skip to content

Instantly share code, notes, and snippets.

@rhoths

rhoths/fpm.sls Secret

Last active October 18, 2017 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhoths/3218c4c976c7ff484720b316d5ff41c1 to your computer and use it in GitHub Desktop.
Save rhoths/3218c4c976c7ff484720b316d5ff41c1 to your computer and use it in GitHub Desktop.
{% for version, config in php.items() %}
php_{{ version }}_service:
service.running:
- name: {{ config.packages.fpm }}
- enable: True
php_fpm_{{ version }}_pool_clear:
file.directory:
- name: {{ config.files.fpm_d }}
- mode: 755
- user: root
- group: root
- clean: True
- listen_in:
- service: php_{{ version }}_service
{% endfor %}
[relidy]$ sudo salt-call state.apply fpm test=false
local:
----------
ID: php_v7_0_service
Function: service.running
Name: php70-php-fpm
Result: True
Comment: The service php70-php-fpm is already running
Started: 02:56:25.807645
Duration: 22.494 ms
Changes:
----------
ID: php_fpm_v7_0_pool_clear
Function: file.directory
Name: /etc/opt/remi/php70/php-fpm.d/
Result: True
Comment: Files cleaned from directory /etc/opt/remi/php70/php-fpm.d
Started: 02:56:27.224661
Duration: 2.39 ms
Changes:
----------
removed:
- /etc/opt/remi/php70/php-fpm.d/www.conf
----------
ID: listener_php_v7_0_service
Function: service.mod_watch
Name: php70-php-fpm
Result: True
Comment: Service restarted
Started: 02:56:28.465877
Duration: 88.386 ms
Changes:
----------
php70-php-fpm:
True
[relidy]$ sudo salt-call state.apply fpm test=true
local:
----------
ID: php_v7_0_service
Function: service.running
Name: php70-php-fpm
Result: True
Comment: The service php70-php-fpm is already running
Started: 02:52:42.798291
Duration: 25.779 ms
Changes:
----------
ID: php_fpm_v7_0_pool_clear
Function: file.directory
Name: /etc/opt/remi/php70/php-fpm.d/
Result: None
Comment: The following files will be changed:
/etc/opt/remi/php70/php-fpm.d/www.conf: removed - Removed due to clean
Started: 02:52:44.079393
Duration: 1.705 ms
Changes:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment