Fix rôle lxc-php for php82 in bookworm container
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2626|6|2620|6|:-1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/lxc-php82/1//ansiblelint">Evolix » ansible-roles » lxc-php82 #1</a>
gitea/ansible-roles/pipeline/head This commit looks good

This commit is contained in:
Eric Morino 2023-08-29 15:07:35 +02:00
parent 8c72a7de8e
commit 090495e920
3 changed files with 19 additions and 3 deletions

View file

@ -33,3 +33,5 @@ lxc_php_services:
php82: 'php8.2-fpm.service'
apt_keyring_dir: "{{ ansible_distribution_major_version is version('12', '<') | ternary('/etc/apt/trusted.gpg.d', '/etc/apt/keyrings') }}"
apt_basics_components: "{{ (ansible_virtualization_role == 'host') | ternary('main contrib non-free', 'main') }}"

View file

@ -1,9 +1,18 @@
---
- name: "{{ lxc_php_version }} - Install PHP packages"
- name: set APT keyring
ansible.builtin.set_fact:
lxc_apt_keyring_dir: /etc/apt/trusted.gpg.d
- name: "{{ lxc_php_version }} - Install dependency packages"
community.general.lxc_container:
name: "{{ lxc_php_version }}"
container_command: "DEBIAN_FRONTEND=noninteractive apt install -y php-fpm php-cli php-gd php-intl php-imap php-ldap php-mysql php-pgsql php-sqlite3 php-curl php-zip php-mbstring php-xml php-zip composer libphp-phpmailer"
container_command: "DEBIAN_FRONTEND=noninteractive apt install -y wget gnupg"
- name: "{{ lxc_php_version }} - delete sources.list bookworm repository"
ansible.builtin.file:
path: "{{ lxc_rootfs }}/etc/apt/sources.list"
state: absent
- name: "{{ lxc_php_version }} - system bookworm repository"
ansible.builtin.template:
@ -40,6 +49,11 @@
name: "{{ lxc_php_version }}"
container_command: "DEBIAN_FRONTEND=noninteractive apt update"
- name: "{{ lxc_php_version }} - Install PHP packages"
community.general.lxc_container:
name: "{{ lxc_php_version }}"
container_command: "DEBIAN_FRONTEND=noninteractive apt install -y php-fpm php-cli php-gd php-intl php-imap php-ldap php-mysql php-pgsql php-sqlite3 php-curl php-zip php-mbstring php-xml php-zip composer libphp-phpmailer"
- name: "{{ lxc_php_version }} - Copy evolinux PHP configuration"
ansible.builtin.template:
src: z-evolinux-defaults.ini.j2

View file

@ -5,4 +5,4 @@ URIs: https://security.debian.org/debian-security
Suites: bookworm-security
Components: {{ apt_basics_components | mandatory }}
Enabled: yes
Signed-By: /usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg
Signed-By: /usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg