Update to 2020-12-21 18:00

master
Daniel Berteaud 4 years ago
parent 155df8e0e6
commit f1a101cdea
  1. 4
      roles/itop/defaults/main.yml
  2. 23
      roles/itop/tasks/install.yml
  3. 2
      roles/itop/templates/perms.sh.j2

@ -7,6 +7,10 @@ itop_build: 6483
itop_archive_url: https://sourceforge.net/projects/itop/files/itop/{{ itop_version }}/iTop-{{ itop_version }}-{{ itop_build }}.zip itop_archive_url: https://sourceforge.net/projects/itop/files/itop/{{ itop_version }}/iTop-{{ itop_version }}-{{ itop_build }}.zip
itop_archive_sha1: 8efede1ba82ce49e35e7eee8b652a75533bfef81 itop_archive_sha1: 8efede1ba82ce49e35e7eee8b652a75533bfef81
itop_php_cas_version: 1.3.8
itop_php_cas_archive_url: https://github.com/apereo/phpCAS/releases/download/{{ itop_php_cas_version }}/CAS-{{ itop_php_cas_version }}.tgz
itop_php_cas_archive_sha1: 7e367ae9b20acb2bca01448425450d22e498d142
itop_root_dir: /opt/itop_{{ itop_id }} itop_root_dir: /opt/itop_{{ itop_id }}
itop_php_user: php-itop_{{ itop_id }} itop_php_user: php-itop_{{ itop_id }}
itop_php_version: 74 itop_php_version: 74

@ -56,12 +56,27 @@
recursive: True recursive: True
delegate_to: "{{ inventory_hostname }}" delegate_to: "{{ inventory_hostname }}"
- name: Install extensions - name: Download php CAS lib
get_url: get_url:
url: "{{ itop_extensions[item].url }}" url: "{{ itop_php_cas_archive_url }}"
checksum: sha1:{{ itop_extensions[item].sha1 }} checksum: sha1:{{ itop_php_cas_archive_sha1 }}
dest: "{{ itop_root_dir }}/tmp" dest: "{{ itop_root_dir }}/tmp"
loop: "{{ itop_extensions.keys() | list }}"
- name: Extract php CAS lib
unarchive:
src: "{{ itop_root_dir }}/tmp/CAS-{{ itop_php_cas_version }}.tgz"
dest: "{{ itop_root_dir }}/tmp"
remote_src: True
- name: Install php CAS lib
synchronize:
src: "{{ itop_root_dir }}/tmp/CAS-{{ itop_php_cas_version }}/{{ item }}"
dest: "{{ itop_root_dir }}/web/lib/"
recursive: True
delegate_to: "{{ inventory_hostname }}"
loop:
- CAS.php
- CAS
tags: itop tags: itop

@ -14,5 +14,7 @@ find {{ itop_root_dir }}/web/{{ dir }} -type f -exec chown root:{{ itop_php_user
{% else %} {% else %}
find {{ itop_root_dir }}/web/{{ dir }} -type d -exec chmod 750 "{}" \; find {{ itop_root_dir }}/web/{{ dir }} -type d -exec chmod 750 "{}" \;
find {{ itop_root_dir }}/web/{{ dir }} -type f -exec chmod 640 "{}" \; find {{ itop_root_dir }}/web/{{ dir }} -type f -exec chmod 640 "{}" \;
setfacl -R -m u:{{ httpd_user | default('apache') }}:rX,d:u:{{ httpd_user | default('apache') }}:rX {{ itop_root_dir }}/web/{{ dir }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
find {{ itop_root_dir }}/web/ -type f -name .htaccess -exec chown root:root "{}" \; -exec chmod 644 "{}" \;

Loading…
Cancel
Save