Update to 2020-11-09 09:00

master
Daniel Berteaud 4 years ago
parent 50ad36a2d8
commit c593e48020
  1. 20
      roles/common/defaults/main.yml
  2. 7
      roles/common/tasks/main.yml
  3. 23
      roles/common/tasks/utils.yml
  4. 13
      roles/common/vars/CentOS-7.yml
  5. 13
      roles/common/vars/CentOS-8.yml
  6. 10
      roles/common/vars/Debian-10.yml
  7. 9
      roles/common/vars/Debian-9.yml
  8. 3
      roles/glpi/meta/main.yml
  9. 2
      roles/glpi/tasks/conf.yml
  10. 1
      roles/glpi/tasks/install.yml
  11. 12
      roles/system_proxy/tasks/main.yml
  12. 4
      roles/ttrss/defaults/main.yml
  13. 23
      roles/ttrss/tasks/main.yml
  14. 6
      roles/ttrss/vars/CentOS-7.yml
  15. 6
      roles/ttrss/vars/CentOS-8.yml

@ -16,7 +16,6 @@ system_utils:
- bzip2 - bzip2
- pbzip2 - pbzip2
- lzop - lzop
- zstd
- vim - vim
- bash-completion - bash-completion
- rsync - rsync
@ -35,25 +34,6 @@ system_utils:
- tree - tree
- mc - mc
# List specific for EL based
system_utils_el:
- openssh-clients
- nc
- xz
- lz4
- yum-utils
- fuse-sshfs
- "{{ ansible_distribution_major_version is version('8', '<') | ternary('policycoreutils-python','python3-policycoreutils') }}"
# List specific for Debian based
system_utils_deb:
- apt-transport-https
- openssh-client
- netcat
- xz-utils
- liblz4-tool
- sshfs
# Kernel modules to load # Kernel modules to load
system_kmods: [] system_kmods: []

@ -1,5 +1,12 @@
--- ---
- 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
- include_tasks: utils.yml - include_tasks: utils.yml
- include_tasks: hostname.yml - include_tasks: hostname.yml
- include_tasks: tz.yml - include_tasks: tz.yml

@ -1,29 +1,12 @@
--- ---
- name: Install common utilities - name: Install common utilities
yum: package:
name: "{{ system_utils }} + {{ system_utils_el }}" name: "{{ system_utils + system_distro_utils}}"
when: ansible_os_family == 'RedHat'
- name: Strip unsupported packages
set_fact: system_utils={{ system_utils | difference(['zstd']) }}
when: ansible_distribution == 'Debian' and ansible_distribution_major_version is version('9', '<')
- name: Install common utilities
apt:
name: "{{ system_utils }} + {{ system_utils_deb }}"
update_cache: True
when: ansible_os_family == 'Debian'
- name: Install extra softwares
yum:
name: "{{ system_extra_pkgs }}"
when: ansible_os_family == 'RedHat'
- name: Install extra softwares - name: Install extra softwares
apt: package:
name: "{{ system_extra_pkgs }}" name: "{{ system_extra_pkgs }}"
when: ansible_os_family == 'Debian'
# Screendump is not used, and prevent using tab to use screen quickly, so remove it # Screendump is not used, and prevent using tab to use screen quickly, so remove it
- name: Check if screendump is present - name: Check if screendump is present

@ -0,0 +1,13 @@
---
system_distro_utils:
- openssh-clients
- nc
- xz
- lz4
- yum-utils
- fuse-sshfs
- policycoreutils-python
- MySQL-python
- python-psycopg2
- zstd

@ -0,0 +1,13 @@
---
system_distro_utils:
- openssh-clients
- nc
- xz
- lz4
- yum-utils
- fuse-sshfs
- python3-policycoreutils
- python3-mysql
- python3-psycopg2
- zstd

@ -0,0 +1,10 @@
---
system_distro_utils:
- apt-transport-https
- openssh-client
- netcat
- xz-utils
- liblz4-tool
- sshfs
- zstd

@ -0,0 +1,9 @@
---
system_distro_utils:
- apt-transport-https
- openssh-client
- netcat
- xz-utils
- liblz4-tool
- sshfs

@ -2,4 +2,7 @@
allow_duplicates: true allow_duplicates: true
dependencies: dependencies:
- role: mkdir - role: mkdir
- role: httpd_php
- role: mysql_server
when: glpi_mysql_server == 'localhost' or glpi_mysql_server == '127.0.0.1'
... ...

@ -21,7 +21,7 @@
tags: glpi tags: glpi
- name: Upgrade database - name: Upgrade database
command: "/bin/php{{ (glpi_php_version == '54') | ternary('',glpi_php_version) }} {{ glpi_root_dir }}/web/bin/console -n db:update" command: "/bin/php{{ glpi_php_version }} {{ glpi_root_dir }}/web/bin/console -n db:update"
when: glpi_install_mode == 'upgrade' when: glpi_install_mode == 'upgrade'
tags: glpi tags: glpi

@ -4,7 +4,6 @@
yum: yum:
name: name:
- unzip - unzip
- MySQL-python
- tar - tar
- bzip2 - bzip2
- acl - acl

@ -51,6 +51,18 @@
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
tags: proxy tags: proxy
- name: Configure proxy for dnf
ini_file:
path: /etc/dnf/yum.conf
section: main
option: proxy
value: "{{ (system_proxy is defined and system_proxy != '') | ternary(system_proxy,'') }}"
state: "{{ (system_proxy is defined and system_proxy != '') | ternary('present','absent') }}"
when:
- ansible_os_family == 'RedHat'
- ansible_distribution_major_version is version('8', '>=')
tags: proxy
- name: Config proxy for apt - name: Config proxy for apt
copy: copy:
content: | content: |

@ -28,5 +28,5 @@ ttrss_php_version: 74
# - 10.32.0.0/16 # - 10.32.0.0/16
# - 192.168.1.0/24 # - 192.168.1.0/24
# Public URL to access Tiny Tiny RSS, must be set # Public URL to access Tiny Tiny RSS
# ttrss_public_url: https://rss.example.org/ ttrss_public_url: https://{{ inventory_hostname }}/

@ -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

@ -0,0 +1,6 @@
---
ttrss_packages:
- git
- MySQL-python
- mariadb

@ -0,0 +1,6 @@
---
ttrss_packages:
- git
- python3-mysql
- mariadb
Loading…
Cancel
Save