Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 316559f1 authored by Jean-François HOVINNE's avatar Jean-François HOVINNE
Browse files

feat: Handle amazon-linux-extras PHP packages (fixes #25)

parent e8c2f690
No related branches found
No related tags found
1 merge request!25feat: Handle amazon-linux-extras PHP packages (fixes #25)
......@@ -22,6 +22,7 @@ Role Variables
* `php_install_oci8_extension`: should the OCI8 extension be installed or not
* `php_oci8_extension_ini_path`: where to store the OCI8 ini file (Ubuntu)
* `php_oracle_instantclient_path`: Oracle Instant Client path
* `php_remove_al2_extras_packages`: should amazon-linux-extras PHP packages be removed or not
See `defaults` and `vars` for the default values.
......
# Releases
## 1.4.x
- The role removes amazon-linux-extras PHP packages by default (Amazon Linux 2).
## 1.3.x
- Default version set to PHP 8.3.
......
......@@ -30,3 +30,6 @@ php_install_xdebug: true
php_install_oci8_extension: true
php_oci8_extension_ini_path: "/etc/php/{{ php_version }}/mods-available/oci8.ini"
php_oracle_instantclient_path: "/opt/oracle/instantclient"
# Remove amazon-linux-extras PHP packages and disable the topics (Amazon Linux 2)
php_remove_al2_extras_packages: true
---
- name: Converge
hosts: all
roles:
- ecgalaxy.bootstrap
- ecgalaxy.common_packages
- ecgalaxy.oracle_instantclient
tasks:
- name: Include php role
ansible.builtin.include_role:
......
---
- name: Prepare
hosts: all
roles:
- role: ecgalaxy.bootstrap
- role: ecgalaxy.common_packages
- role: ecgalaxy.oracle_instantclient
tasks:
- name: Install amazon-linux-extras packages
ansible.builtin.command: amazon-linux-extras install php8.1
environment:
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
no_proxy: "{{ lookup('env', 'no_proxy') }}"
become: true
......@@ -6,6 +6,10 @@
ansible.builtin.include_vars: "{{ ansible_distribution }}.yml"
when: ansible_distribution == 'Amazon'
- name: Prepare environment (Amazon Linux)
ansible.builtin.include_tasks: "prepare-{{ ansible_distribution }}.yml"
when: ansible_distribution == 'Amazon' and php_remove_al2_extras_packages
- name: "Setup - PHP {{ php_version }}"
ansible.builtin.include_tasks: "setup-{{ ansible_os_family }}.yml"
......
---
- name: Remove amazon-linux-extras PHP packages
ansible.builtin.yum:
name:
- "php-*.amzn2"
- "libzip-1*.amzn2*"
state: absent
become: true
- name: Disable amazon-linux-extras PHP repositories
ansible.builtin.yum_repository:
name: "amzn2extra-php8.*"
state: absent
become: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment