cosmetic change and working example in readme

This commit is contained in:
2025-09-25 09:06:30 +02:00
parent 75682268b7
commit f05fb7ce98
2 changed files with 30 additions and 10 deletions

View File

@@ -31,7 +31,17 @@ Including an example of how to use your role (for instance, with variables passe
- hosts: servers - hosts: servers
roles: roles:
- { role: phpldapadmin, basedn: dc=ldx } - role: tco.php-fpm
¦tags: pla,wips
¦vars:
¦ php_packages:
¦ ¦ - php8.1-ldap
¦ ¦ - php8.1-xml
¦ php_version: "8.1"
¦ php_fpm_create_pool: true
¦ php_fpm_pool_user: selfservicepassword
¦ php_fpm_listen_socket: /srv/pla/socket
- { role: phpldapadmin, basedn: dc=ldx }
License License
------- -------

View File

@@ -1,23 +1,33 @@
- name: get archive - name: "[pla] - get archive"
ansible.builtin.get_url: ansible.builtin.get_url:
url: https://github.com/leenooks/phpLDAPadmin/archive/{{ pla_version }}.tar.gz url: https://github.com/leenooks/phpLDAPadmin/archive/{{ pla_version }}.tar.gz
dest: /tmp/pla_{{pla_version }}.gz dest: /tmp/pla_{{pla_version }}.gz
- ansible.builtin.file: - name: "[pla] - create base dir"
ansible.builtin.file:
path: "{{ pla_install_dir }}" path: "{{ pla_install_dir }}"
state: directory state: directory
- ansible.builtin.unarchive: - name: "[pla] - extract archive"
dest: /{{ pla_install_dir }} ansible.builtin.unarchive:
dest: "{{ pla_install_dir }}"
src: /tmp/pla_{{pla_version }}.gz src: /tmp/pla_{{pla_version }}.gz
remote_src: true remote_src: true
owner: "{{ pla_install_dir_owner }}"
- name: "[pla : link ]" - name: "[pla] - link"
tags: skip
ansible.builtin.file: ansible.builtin.file:
src: /{{ pla_install_dir }}/phpLDAPadmin-{{ pla_version }} src: "{{ pla_install_dir }}/phpLDAPadmin-{{ pla_version }}"
state: link state: link
dest: /{{ pla_install_dir }}/pla dest: "{{ pla_install_dir }}/pla"
owner: "{{ pla_install_dir_owner }}"
- name: "[pla] - fixownership"
tags: chown
ansible.builtin.file:
path: "{{ pla_install_dir }}/phpLDAPadmin-{{ pla_version }}"
recurse: true
state: directory
owner: "{{ pla_install_dir_owner }}" owner: "{{ pla_install_dir_owner }}"
- name: "[pla] - configure" - name: "[pla] - configure"
@@ -25,6 +35,6 @@
bigrandomstring: "{{ lookup('password', '/dev/null chars=ascii_letters,digit length=128', seed=inventory_hostname) | lower }}" bigrandomstring: "{{ lookup('password', '/dev/null chars=ascii_letters,digit length=128', seed=inventory_hostname) | lower }}"
ansible.builtin.template: ansible.builtin.template:
src: pla_config.php src: pla_config.php
dest: /{{ pla_install_dir }}/pla/config/config.php dest: "{{ pla_install_dir }}/pla/config/config.php"
owner: "{{ pla_install_dir_owner }}" owner: "{{ pla_install_dir_owner }}"