Skip to content

Commit

Permalink
Add Debian 112 support
Browse files Browse the repository at this point in the history
  • Loading branch information
supertarto committed Jul 25, 2024
1 parent e2e5746 commit e7f54f8
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 54 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/main.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,45 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'supertarto.glpi'

- name: Set up Python 3.
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install ansible yamllint
run: pip3 install yamllint

- name: Lint code.
run: |
yamllint .
molecule:
name: Molecule
runs-on: ubuntu-latest
strategy:
matrix:
distrib:
- debian10:latest
- debian10
- debian11
- debian12

steps:
- name: Check out the codebase.
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'supertarto.glpi'

- name: Set up Python 3.
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install ansible molecule[docker] docker
run: pip3 install ansible molecule-plugins[docker] docker

- name: Disable AppArmor on Debian.
run: |
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Release
'on':
push:
tags:
- '*'

defaults:
run:
working-directory: 'supertarto.glpi'

jobs:

release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: 'supertarto.glpi'

- name: Trigger a new import on Galaxy.
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
10 changes: 2 additions & 8 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
glpi_version: 9.4.5
glpi_version_package: glpi-9.4.5.tgz
glpi_version: 10.0.16
glpi_version_package: glpi-10.0.16.tgz

glpi_auto_install: false
glpi_update: false
Expand All @@ -10,12 +10,6 @@ glpi_web_owner: "www-data"
glpi_web_group: "www-data"
glpi_install_path: /var/www

glpi_plugins_dl_addr:
- "https://github.com/fusioninventory/fusioninventory-for-glpi/releases/download/glpi9.4%2B2.3/fusioninventory-9.4+2.3.tar.bz2"

glpi_plugins_tar_name:
- fusioninventory-9.4+2.3.tar.bz2

glpi_db_host: "localhost"
glpi_db_port: "3306"
glpi_db_name: "glpi"
Expand Down
15 changes: 8 additions & 7 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
dependencies: []

galaxy_info:
author: "Xavier Binois"
description: "Install and configure GLPI with Ansible"
role_name: glpi
license: "GNU General Public License v3.0"
min_ansible_version: 2.8
min_ansible_version: 2.10

platforms:
- name: "Debian"
versions:
- "buster"

galaxy_tags:
- glpi
- inventory
versions:

Check failure on line 14 in meta/main.yml

View workflow job for this annotation

GitHub Actions / Lint

14:7 [key-duplicates] duplication of key "versions" in mapping
- buster
- bullseye
- bookworm

dependencies: []
galaxy_tags: []
29 changes: 15 additions & 14 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,23 @@
- role: supertarto.glpi
vars:
php_packages:
- php7.3
- php7.3-gd
- php7.3-mysql
- php7.3-curl
- php7.3-imap
- php7.3-json
- php7.3-ldap
- php7.3-mbstring
- php7.3-xml
- php7.3-cli
- php7.3-xmlrpc
- php7.3-intl
- php{{php_default_version_debian}}
- php{{php_default_version_debian}}-gd
- php{{php_default_version_debian}}-mysql
- php{{php_default_version_debian}}-curl
- php{{php_default_version_debian}}-imap
- php{{php_default_version_debian}}-json
- php{{php_default_version_debian}}-ldap
- php{{php_default_version_debian}}-mbstring
- php{{php_default_version_debian}}-xml
- php{{php_default_version_debian}}-cli
- php{{php_default_version_debian}}-xmlrpc
- php{{php_default_version_debian}}-intl
- php-apcu
- php-cas
- php7.3-zip
- php7.3-bz2
- php{{php_default_version_debian}}-zip
- php{{php_default_version_debian}}-bz2

glpi_auto_install: true
glpi_db_host: "localhost"
glpi_db_port: "3306"
Expand Down
4 changes: 3 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
role_name_check: 1
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: instance
image: "thetarto/ansible-${MOLECULE_DISTRIB}"
image: "thetarto/ansible-${MOLECULE_DISTRIB}:latest"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
cgroupns_mode: host
privileged: true
command: /lib/systemd/systemd
pre_build_image: true
Expand Down
17 changes: 0 additions & 17 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,3 @@
owner: "{{ glpi_web_owner }}"
group: "{{ glpi_web_group }}"
when: not glpiinstalled.stat.exists or glpi_update

- name: Download plugins
get_url:
url: "{{ item }}"
dest: "{{ glpi_install_path }}/glpi/plugins"
with_items: "{{ glpi_plugins_dl_addr }}"
when: glpi_plugins_dl_addr is defined

- name: Unarchive plugins
unarchive:
src: "{{ glpi_install_path }}/glpi/plugins/{{ item }}"
dest: "{{ glpi_install_path }}/glpi/plugins"
owner: "{{ glpi_web_owner }}"
group: "{{ glpi_web_group }}"
remote_src: true
with_items: "{{ glpi_plugins_tar_name }}"
when: glpi_plugins_dl_addr is defined

0 comments on commit e7f54f8

Please sign in to comment.