diff --git a/ansible/roles/azuracast-radio/tasks/liquidsoap.yml b/ansible/roles/azuracast-radio/tasks/liquidsoap.yml index 2672267..3c9e707 100644 --- a/ansible/roles/azuracast-radio/tasks/liquidsoap.yml +++ b/ansible/roles/azuracast-radio/tasks/liquidsoap.yml @@ -91,7 +91,7 @@ - name: Install Liquidsoap apt: - deb: "https://github.com/savonet/liquidsoap/releases/download/v2.1.3/liquidsoap_2.1.3-ubuntu-{{ ansible_distribution_release }}-1_{{ dpkg_arch.stdout_lines[0] | default('amd64') }}.deb" + deb: "https://github.com/savonet/liquidsoap/releases/download/v2.1.4/liquidsoap_2.1.4-ubuntu-{{ ansible_distribution_release }}-1_{{ dpkg_arch.stdout_lines[0] | default('amd64') }}.deb" - name: Link Liquidsoap binary file: diff --git a/ansible/roles/azuracast-radio/tasks/main.yml b/ansible/roles/azuracast-radio/tasks/main.yml index 2f66a4d..d154e8e 100644 --- a/ansible/roles/azuracast-radio/tasks/main.yml +++ b/ansible/roles/azuracast-radio/tasks/main.yml @@ -5,7 +5,8 @@ - name: Install Liquidsoap (Focal) include_tasks: liquidsoap.yml when: - - ansible_distribution_release == 'focal' + - ansible_distribution == 'Ubuntu' and ansible_distribution_release in ['focal', 'jammy'] + - name: Add Audiowaveform PPA apt_repository: diff --git a/ansible/roles/mariadb/tasks/main.yml b/ansible/roles/mariadb/tasks/main.yml index 54d2148..df7fc20 100644 --- a/ansible/roles/mariadb/tasks/main.yml +++ b/ansible/roles/mariadb/tasks/main.yml @@ -42,3 +42,12 @@ enabled: false state: stopped ignore_errors: true + +- name: Create run subfolder + become: yes + file: + path: /run/mysqld/ + state: directory + owner: mysql + group: mysql + mode: 0755 diff --git a/ansible/roles/mariadb/templates/supervisor.conf.j2 b/ansible/roles/mariadb/templates/supervisor.conf.j2 index bdcd930..3a54867 100644 --- a/ansible/roles/mariadb/templates/supervisor.conf.j2 +++ b/ansible/roles/mariadb/templates/supervisor.conf.j2 @@ -1,7 +1,9 @@ [program:mariadb] command=/usr/sbin/mariadbd user=mysql -priority=100 +priority=200 numprocs=1 autostart=true autorestart=unexpected +stdout_logfile=/var/log/supervisor/%(program_name)s.log +stderr_logfile=/var/log/supervisor/%(program_name)s_error.log diff --git a/ansible/roles/nginx/tasks/main.yml b/ansible/roles/nginx/tasks/main.yml index 4e26ef8..0eb03ef 100644 --- a/ansible/roles/nginx/tasks/main.yml +++ b/ansible/roles/nginx/tasks/main.yml @@ -84,6 +84,13 @@ state: link src: "{{ app_base }}/acme/default.crt" +- name: Disable Nginx service + service: + name: "nginx" + enabled: false + state: stopped + ignore_errors: true + - name: Install Nginx Supervisord conf template: src: supervisor.conf.j2 @@ -91,9 +98,3 @@ force: true mode: 0644 -- name: Disable Nginx service - service: - name: "nginx" - enabled: false - state: stopped - ignore_errors: true diff --git a/ansible/roles/nginx/templates/nginx.conf.j2 b/ansible/roles/nginx/templates/nginx.conf.j2 index ec607ee..bcc6941 100644 --- a/ansible/roles/nginx/templates/nginx.conf.j2 +++ b/ansible/roles/nginx/templates/nginx.conf.j2 @@ -39,7 +39,7 @@ http { # SSL Settings ## -{% if ansible_distribution_release == 'focal' %} +{% if ansible_distribution_release in ['focal','jammy'] %} ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384'; ssl_prefer_server_ciphers off; diff --git a/ansible/roles/php/templates/supervisor.conf.j2 b/ansible/roles/php/templates/supervisor.conf.j2 index ebdbe4e..6472bf8 100644 --- a/ansible/roles/php/templates/supervisor.conf.j2 +++ b/ansible/roles/php/templates/supervisor.conf.j2 @@ -1,5 +1,5 @@ [program:php-fpm] -command=/usr/sbin/php-fpm{{ php_version }} --nodaemonize --fpm-config /etc/php/8.1/fpm/php-fpm.conf +command=/usr/sbin/php-fpm{{ php_version }} --nodaemonize --fpm-config /etc/php/{{ php_version }}/fpm/php-fpm.conf priority=500 numprocs=1 autostart=true diff --git a/ansible/roles/redis/tasks/main.yml b/ansible/roles/redis/tasks/main.yml index a0bb973..cc25bce 100644 --- a/ansible/roles/redis/tasks/main.yml +++ b/ansible/roles/redis/tasks/main.yml @@ -1,13 +1,20 @@ --- -- name: Add Redis PPA repository (Focal) +- name: Import the Redis APT key + apt_key: + url: https://packages.redis.io/gpg + state: present + become: true + +- name: Install Redis deb repository apt_repository: - repo: "ppa:chris-lea/redis-server" - update_cache: true - when: ansible_distribution_release == 'focal' + repo: deb https://packages.redis.io/deb {{ ansible_distribution_release }} main + state: present + become: true - name: Install Redis apt: name: redis-server + update_cache: yes - name: Install Redis Conf template: diff --git a/ansible/roles/ufw/tasks/main.yml b/ansible/roles/ufw/tasks/main.yml index 9f683da..b420a8e 100644 --- a/ansible/roles/ufw/tasks/main.yml +++ b/ansible/roles/ufw/tasks/main.yml @@ -19,9 +19,9 @@ port: "{{ ufw_allow_rule }}" proto: tcp loop: - - 80 - - 443 - - 2022 + - '80' + - '443' + - '2022' - '8000:8999' loop_control: loop_var: ufw_allow_rule diff --git a/ansible/roles/uninstall/tasks/main.yml b/ansible/roles/uninstall/tasks/main.yml index b083306..a1a601e 100644 --- a/ansible/roles/uninstall/tasks/main.yml +++ b/ansible/roles/uninstall/tasks/main.yml @@ -12,7 +12,11 @@ loop: - "influxdb" - "mysql" + - "mariadb" - "php7.4-fpm" + - "php8.0-fpm" + - "php8.1-fpm" + - "php8.2-fpm" - "nginx" - "redis-server" - "supervisor" @@ -59,12 +63,7 @@ - name: Remove software apt: - name: "{{ packages }}" - state: absent - force: true - purge: true - vars: - packages: + name: # Radio software - icecast2 - liquidsoap @@ -98,9 +97,13 @@ - nginx - nginx-* - # PHP 7.2 + # PHP - php7.2-* + - php7.3-* - php7.4-* + - php8.0-* + - php8.1-* + - php8.2-* # MariaDB - mariadb-* @@ -120,3 +123,13 @@ # System packages - pwgen - lnav + state: absent + force: true + purge: true + autoremove: true + ignore_errors: true + +- name: clean up the apt cache + apt: + autoclean: true + become: true