|
|
@ -1,17 +1,20 @@ |
|
|
|
--- |
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- include_vars: "{{ item }}" |
|
|
|
|
|
|
|
with_first_found: |
|
|
|
|
|
|
|
- vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml |
|
|
|
|
|
|
|
- vars/{{ ansible_distribution }}.yml |
|
|
|
|
|
|
|
- vars/{{ ansible_os_family }}.yml |
|
|
|
|
|
|
|
- vars/defaults.yml |
|
|
|
|
|
|
|
|
|
|
|
- name: Set default install mode |
|
|
|
- name: Set default install mode |
|
|
|
set_fact: ttrss_install_mode='none' |
|
|
|
set_fact: ttrss_install_mode='none' |
|
|
|
|
|
|
|
|
|
|
|
- name: Set php executable |
|
|
|
- name: Set php executable |
|
|
|
set_fact: ttrss_php_bin=/usr/bin/php{{ (ttrss_php_version == '54') | ternary('',ttrss_php_version) }} |
|
|
|
set_fact: ttrss_php_bin=/usr/bin/php{{ ttrss_php_version }} |
|
|
|
|
|
|
|
|
|
|
|
- name: Install packages |
|
|
|
- name: Install packages |
|
|
|
yum: |
|
|
|
yum: name={{ ttrss_packages }} |
|
|
|
name: |
|
|
|
|
|
|
|
- git |
|
|
|
|
|
|
|
- MySQL-python |
|
|
|
|
|
|
|
- mariadb |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Create user account for PHP |
|
|
|
- name: Create user account for PHP |
|
|
|
user: |
|
|
|
user: |
|
|
@ -110,16 +113,16 @@ |
|
|
|
notify: reload httpd |
|
|
|
notify: reload httpd |
|
|
|
|
|
|
|
|
|
|
|
- name: Deploy PHP configuration |
|
|
|
- name: Deploy PHP configuration |
|
|
|
template: src=php.conf.j2 dest={{ httpd_php_versions[ttrss_php_version].conf_path }}/php-fpm.d/ttrss_{{ ttrss_id }}.conf |
|
|
|
template: src=php.conf.j2 dest=/etc/opt/remi/php{{ ttrss_php_version }}/php-fpm.d/ttrss_{{ ttrss_id }}.conf |
|
|
|
notify: restart php-fpm |
|
|
|
notify: restart php-fpm |
|
|
|
|
|
|
|
|
|
|
|
- name: Remove PHP configuration from other versions |
|
|
|
- name: Remove PHP configuration from other versions |
|
|
|
file: path={{ httpd_php_versions[item].conf_path }}/php-fpm.d/ttrss_{{ ttrss_id }}.conf state=absent |
|
|
|
file: path=/etc/opt/remi/php{{ item }}/php-fpm.d/ttrss_{{ ttrss_id }}.conf state=absent |
|
|
|
with_items: "{{ httpd_php_versions.keys() | list | difference([ ttrss_php_version ]) }}" |
|
|
|
with_items: "{{ httpd_php_versions | difference([ ttrss_php_version ]) }}" |
|
|
|
notify: restart php-fpm |
|
|
|
notify: restart php-fpm |
|
|
|
|
|
|
|
|
|
|
|
- name: Remove PHP configuration (using a custom pool) |
|
|
|
- name: Remove PHP configuration (using a custom pool) |
|
|
|
file: path={{ httpd_php_versions[ttrss_php_version].conf_path }}/php-fpm.d/ttrss_{{ ttrss_id }}.conf state=absent |
|
|
|
file: path=/etc/opt/remi/php{{ ttrss_php_version }}/php-fpm.d/ttrss_{{ ttrss_id }}.conf state=absent |
|
|
|
when: ttrss_php_fpm_pool is defined |
|
|
|
when: ttrss_php_fpm_pool is defined |
|
|
|
notify: restart php-fpm |
|
|
|
notify: restart php-fpm |
|
|
|
|
|
|
|
|
|
|
|