Skip to content

Commit

Permalink
OS updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bviktor committed Nov 8, 2024
1 parent bb81c5f commit 3b2bf92
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Fedora 38
name: Fedora 40

on: # yamllint disable-line rule:truthy
push:
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Test Galaxy role
run: >
CONT_ID=$(podman run --rm -v ${{ github.workspace }}:/repo -v /sys/fs/cgroup:/sys/fs/cgroup:ro
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-fedora:38) &&
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-fedora:40) &&
podman exec ${CONT_ID} /bin/bash -c
"if [ -f requirements.yml ]; then ansible-galaxy role install --force -r requirements.yml -p ..; fi &&
ANSIBLE_ROLES_PATH=.. ANSIBLE_FORCE_COLOR=true ansible-playbook tests/main.yml" &&
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Fedora 39
name: Fedora 41

on: # yamllint disable-line rule:truthy
push:
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Test Galaxy role
run: >
CONT_ID=$(podman run --rm -v ${{ github.workspace }}:/repo -v /sys/fs/cgroup:/sys/fs/cgroup:ro
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-fedora:39) &&
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-fedora:41) &&
podman exec ${CONT_ID} /bin/bash -c
"if [ -f requirements.yml ]; then ansible-galaxy role install --force -r requirements.yml -p ..; fi &&
ANSIBLE_ROLES_PATH=.. ANSIBLE_FORCE_COLOR=true ansible-playbook tests/main.yml" &&
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Ubuntu 18.04
name: Ubuntu 24.04

on: # yamllint disable-line rule:truthy
push:
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Test Galaxy role
run: >
CONT_ID=$(podman run --rm -v ${{ github.workspace }}:/repo -v /sys/fs/cgroup:/sys/fs/cgroup:ro
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-ubuntu:18.04) &&
--tmpfs /tmp --tmpfs /run --privileged --detach bviktor/ansible-systemd-ubuntu:24.04) &&
podman exec ${CONT_ID} /bin/bash -c
"if [ -f requirements.yml ]; then ansible-galaxy role install --force -r requirements.yml -p ..; fi &&
ANSIBLE_ROLES_PATH=.. ANSIBLE_FORCE_COLOR=true ansible-playbook tests/main.yml" &&
Expand Down
2 changes: 1 addition & 1 deletion tasks/host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
notify: Reload nginx

- include_tasks: selinux.yml
when: ansible_pkg_mgr == 'dnf'
when: ansible_os_family == 'RedHat'

- name: "Enable {{ domain }} host"
file:
Expand Down
2 changes: 1 addition & 1 deletion tasks/main2.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- include_tasks: apt_cache.yml
when: ansible_pkg_mgr == 'apt' and noobient_apt_cache_updated is not defined
when: ansible_os_family == 'Debian' and noobient_apt_cache_updated is not defined

- include_tasks: wordpress.yml
when: (noobient_nginx_wp_installed is not defined) and (mode == 'wordpress')
Expand Down
10 changes: 5 additions & 5 deletions tasks/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
cmd: "update-alternatives --query php | grep '^Best' | awk '{print $2}' | xargs basename | sed 's/php//'"
changed_when: false
register: noobient_nginx_php_check
when: ansible_pkg_mgr == 'apt'
when: ansible_os_family == 'Debian'

- set_fact:
noobient_nginx_php_ver: "{{ noobient_nginx_php_check.stdout_lines[0] }}"
when: ansible_pkg_mgr == 'apt'

- set_fact:
noobient_nginx_php_unit: "php{% if ansible_pkg_mgr == 'apt' %}{{ noobient_nginx_php_ver }}{% endif %}-fpm.service"
noobient_nginx_php_ini: "{% if ansible_pkg_mgr == 'dnf' %}/etc/php.ini{% else %}/etc/php/{{ noobient_nginx_php_ver }}/fpm/php.ini{% endif %}"
noobient_nginx_fpm_conf: "{% if ansible_pkg_mgr == 'dnf' %}/etc/php-fpm.d/{% else %}/etc/php/{{ noobient_nginx_php_ver }}/fpm/pool.d/{% endif %}www.conf"
noobient_nginx_fpm_sock: "{% if ansible_pkg_mgr == 'dnf' %}{{ default_fpm_sock }}{% else %}/run/php/php{{ noobient_nginx_php_ver }}-fpm.sock{% endif %}"
noobient_nginx_php_unit: "php{% if ansible_os_family == 'Debian' %}{{ noobient_nginx_php_ver }}{% endif %}-fpm.service"
noobient_nginx_php_ini: "{% if ansible_os_family == 'RedHat' %}/etc/php.ini{% else %}/etc/php/{{ noobient_nginx_php_ver }}/fpm/php.ini{% endif %}"
noobient_nginx_fpm_conf: "{% if ansible_os_family == 'RedHat' %}/etc/php-fpm.d/{% else %}/etc/php/{{ noobient_nginx_php_ver }}/fpm/pool.d/{% endif %}www.conf"
noobient_nginx_fpm_sock: "{% if ansible_os_family == 'RedHat' %}{{ default_fpm_sock }}{% else %}/run/php/php{{ noobient_nginx_php_ver }}-fpm.sock{% endif %}"

- name: Set PHP options
ini_file:
Expand Down
6 changes: 3 additions & 3 deletions tasks/wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
- php-json
- php-mbstring
- php-xml
- "php{% if ansible_pkg_mgr == 'apt' %}{{ noobient_nginx_php_ver }}{% endif %}-intl"
- "php{% if ansible_pkg_mgr == 'dnf' %}-pecl{% else %}{{ noobient_nginx_php_ver }}{% endif %}-zip"
- "php{% if ansible_os_family == 'Debian' %}{{ noobient_nginx_php_ver }}{% endif %}-intl"
- "php{% if ansible_os_family == 'RedHat' %}-pecl{% else %}{{ noobient_nginx_php_ver }}{% endif %}-zip"
register: noobient_nginx_wp_installed

# Not available on EL8
- name: Install ImageMagick PHP extension
package:
name: "php{% if ansible_pkg_mgr == 'dnf' %}-pecl{% else %}{{ noobient_nginx_php_ver }}{% endif %}-imagick"
name: "php{% if ansible_os_family == 'RedHat' %}-pecl{% else %}{{ noobient_nginx_php_ver }}{% endif %}-imagick"
state: latest
when: not (ansible_distribution_major_version == '8' and ansible_os_family == 'RedHat')
2 changes: 1 addition & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
nginx_root: /etc/nginx
nginx_account: "{% if ansible_pkg_mgr == 'dnf' %}nginx{% else %}www-data{% endif %}"
nginx_account: "{% if ansible_os_family == 'RedHat' %}nginx{% else %}www-data{% endif %}"

eff_path: "{% if path is defined and path | length %}{{ path }}{% else %}/var/www/html/{{ domain }}{% endif %}"
eff_www_mode: "{% if www_mode is defined and www_mode | length %}{{ www_mode }}{% else %}redirect{% endif %}"
Expand Down

0 comments on commit 3b2bf92

Please sign in to comment.