ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
---

- name: "[Alpine] Install extra PHP{{ services.php_fpm.version | default(7) }} modules" 
  apk:
    name: "php{{ services.php_fpm.version | default(7) }}-{{ item }}"
    state: present
  loop: "{{ query('list', services.php_fpm.extraModules)[0] }}"
  when:
    - ansible_distribution == "Alpine"

- name: "[Archlinux] Install extra PHP7 modules" 
  pacman:
    name: "php7-{{ item }}"
    state: present
  loop: "{{ query('list', services.php_fpm.extraModules)[0] }}"
  when:
    - ansible_distribution == "Archlinux"
    - services.php_fpm.version is not defined or services.php_fpm.version == 7

- name: "[Archlinux] Install extra PHP8 modules" 
  pacman:
    name: "php-{{ item }}"
    state: present
  loop: "{{ query('list', services.php_fpm.extraModules)[0] }}"
  when:
    - ansible_distribution == "Archlinux"
    - services.php_fpm.version == 8