From 87c7d9176c3f547de29468b8ce780d9a609b3673 Mon Sep 17 00:00:00 2001 From: Jocelyn Jaubert Date: Sun, 19 Nov 2023 17:42:43 +0100 Subject: [PATCH 1/3] =?UTF-8?q?Suppression=20r=C3=B4le=20galette?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ce rôle était utilisé pour gérer les adhésions à l'association osm-fr. --- .config/ansible-lint-ignore.txt | 11 ---- galette.yml | 5 -- hosts | 2 - roles/galette/handlers/main.yml | 2 - roles/galette/tasks/main.yml | 79 ----------------------------- roles/galette/templates/apache.site | 20 -------- 6 files changed, 119 deletions(-) delete mode 100644 galette.yml delete mode 100644 roles/galette/handlers/main.yml delete mode 100644 roles/galette/tasks/main.yml delete mode 100644 roles/galette/templates/apache.site diff --git a/.config/ansible-lint-ignore.txt b/.config/ansible-lint-ignore.txt index 51119d6c..aa015a74 100644 --- a/.config/ansible-lint-ignore.txt +++ b/.config/ansible-lint-ignore.txt @@ -6,7 +6,6 @@ comcommaker.yml name[casing] common.yml name[casing] drupal.yml name[casing] export-cadastre.yml name[casing] -galette.yml name[casing] geoosm.yml name[casing] jenkins-slave.yml name[casing] layers.openstreetmap.fr.yml name[casing] @@ -148,16 +147,6 @@ roles/export-cadastre/tasks/main.yml name[casing] roles/export-cadastre/tasks/main.yml name[missing] roles/export-cadastre/tasks/main.yml no-free-form roles/export-cadastre/tasks/main.yml risky-file-permissions -roles/galette/handlers/main.yml fqcn[action-core] -roles/galette/handlers/main.yml name[casing] -roles/galette/handlers/main.yml no-free-form -roles/galette/tasks/main.yml deprecated-module -roles/galette/tasks/main.yml fqcn[action-core] -roles/galette/tasks/main.yml fqcn[action] -roles/galette/tasks/main.yml name[casing] -roles/galette/tasks/main.yml name[missing] -roles/galette/tasks/main.yml no-free-form -roles/galette/tasks/main.yml risky-file-permissions roles/geoosm/tasks/main.yml deprecated-module roles/geoosm/tasks/main.yml fqcn[action-core] roles/geoosm/tasks/main.yml fqcn[action] diff --git a/galette.yml b/galette.yml deleted file mode 100644 index 22e83ead..00000000 --- a/galette.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: galette configuration - hosts: galette - become: yes - roles: - - galette diff --git a/hosts b/hosts index c3e7d1cd..abfb4650 100644 --- a/hosts +++ b/hosts @@ -164,8 +164,6 @@ cadastre.vm.openstreetmap.fr [phpbb] osm139.openstreetmap.fr # for forum.openstreetmap.fr -[galette] - [geoosm] osm167.openstreetmap.fr diff --git a/roles/galette/handlers/main.yml b/roles/galette/handlers/main.yml deleted file mode 100644 index 8334e9df..00000000 --- a/roles/galette/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -- name: restart apache - service: name=apache2 state=restarted diff --git a/roles/galette/tasks/main.yml b/roles/galette/tasks/main.yml deleted file mode 100644 index 5b7341c1..00000000 --- a/roles/galette/tasks/main.yml +++ /dev/null @@ -1,79 +0,0 @@ -- name: set galette version - set_fact: - galette_version: 0.8.3.4 - -- name: install packages - apt: pkg={{ item }} - with_items: - - apache2 - - libapache2-mod-php - - mysql-server - - php-curl - - php-db - - php-gd - - php-gettext - - php-mysql - - php-tidy - - python-mysqldb # for ansible module mysql_user - -- include: ../../../shared/project-account.yml user=galette - - -# install galette manually in /data/project/galette/galette -- name: check if galette was installed - stat: - path: /data/project/galette/galette - register: p - -- name: download galette - get_url: - url: http://download.tuxfamily.org/galette/galette-{{ galette_version }}.tar.bz2 - dest: /data/project/galette/galette-{{ galette_version }}.tar.bz2 - sha256sum: 9ae19ada7f20584d67121eca8c294ba5543abd377349b4b2268c9bf57340e94e - become: yes - become_user: galette - when: not (p.stat.isdir is defined and p.stat.isdir) - -- name: extract galette - unarchive: - creates: /data/project/galette/galette-{{ galette_version }} - src: /data/project/galette/galette-{{ galette_version }}.tar.bz2 - dest: /data/project/galette/ - remote_src: yes - become: yes - become_user: galette - -- name: change ownership - file: - path: /data/project/galette/galette-{{ galette_version }}/galette/{{ item }} - owner: www-data - group: www-data - state: directory - recurse: yes - with_items: - - config - - data - -- name: create mysql user - mysql_user: - name: galette - password: "{{ lookup('password', 'credentials/galette/' + inventory_hostname) }}" - priv: "galette.*:ALL" - -- name: create mysql db - mysql_db: - name: galette - state: present - -- name: copy apache config - template: - src: apache.site - dest: "/etc/apache2/sites-available/galette.conf" - notify: restart apache - -- name: enable apache site - file: - src: "/etc/apache2/sites-available/galette.conf" - dest: "/etc/apache2/sites-enabled/galette.conf" - state: link - notify: restart apache diff --git a/roles/galette/templates/apache.site b/roles/galette/templates/apache.site deleted file mode 100644 index b598826c..00000000 --- a/roles/galette/templates/apache.site +++ /dev/null @@ -1,20 +0,0 @@ - - ServerAdmin webmaster@localhost - - ServerName adherents.openstreetmap.fr - ServerAlias dev.adherents.openstreetmap.fr - - DocumentRoot /data/project/galette/galette-{{ galette_version }}/galette/ - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Require all granted - - - AccessFileName .htaccess - - LogLevel warn - ErrorLog /var/log/apache2/galette-error.log - CustomLog /var/log/apache2/galette-access.log combined - - From 96fd12de9e20b7efd89fe32d68c9f8fb7a22b03f Mon Sep 17 00:00:00 2001 From: Jocelyn Jaubert Date: Sun, 19 Nov 2023 17:43:11 +0100 Subject: [PATCH 2/3] =?UTF-8?q?Suppresion=20r=C3=B4le=20jenkins-slave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ce rôle était utilisé pour lancer les jobs des backends osmose. --- .config/ansible-lint-ignore.txt | 9 -------- jenkins-slave.yml | 6 ----- roles/jenkins-slave/files/jenkins-ssh-key | 1 - roles/jenkins-slave/files/run.sh | 2 -- roles/jenkins-slave/files/sudoers | 1 - roles/jenkins-slave/tasks/main.yml | 27 ----------------------- 6 files changed, 46 deletions(-) delete mode 100644 jenkins-slave.yml delete mode 100644 roles/jenkins-slave/files/jenkins-ssh-key delete mode 100755 roles/jenkins-slave/files/run.sh delete mode 100644 roles/jenkins-slave/files/sudoers delete mode 100644 roles/jenkins-slave/tasks/main.yml diff --git a/.config/ansible-lint-ignore.txt b/.config/ansible-lint-ignore.txt index aa015a74..4a95228c 100644 --- a/.config/ansible-lint-ignore.txt +++ b/.config/ansible-lint-ignore.txt @@ -7,7 +7,6 @@ common.yml name[casing] drupal.yml name[casing] export-cadastre.yml name[casing] geoosm.yml name[casing] -jenkins-slave.yml name[casing] layers.openstreetmap.fr.yml name[casing] letsencrypt.yml name[casing] live.yml name[casing] @@ -154,14 +153,6 @@ roles/geoosm/tasks/main.yml latest[git] roles/geoosm/tasks/main.yml name[casing] roles/geoosm/tasks/main.yml name[missing] roles/geoosm/tasks/main.yml no-free-form -roles/jenkins-slave role-name -roles/jenkins-slave/tasks/main.yml deprecated-module -roles/jenkins-slave/tasks/main.yml fqcn[action-core] -roles/jenkins-slave/tasks/main.yml fqcn[action] -roles/jenkins-slave/tasks/main.yml name[casing] -roles/jenkins-slave/tasks/main.yml name[missing] -roles/jenkins-slave/tasks/main.yml no-free-form -roles/jenkins-slave/tasks/main.yml risky-file-permissions roles/layers.openstreetmap.fr role-name roles/layers.openstreetmap.fr/handlers/main.yml fqcn[action-core] roles/layers.openstreetmap.fr/handlers/main.yml name[casing] diff --git a/jenkins-slave.yml b/jenkins-slave.yml deleted file mode 100644 index 11944398..00000000 --- a/jenkins-slave.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: jenkins-slave configuration - hosts: jenkins-slave - gather_facts: no - become: yes - roles: - - jenkins-slave diff --git a/roles/jenkins-slave/files/jenkins-ssh-key b/roles/jenkins-slave/files/jenkins-ssh-key deleted file mode 100644 index 3ed2922f..00000000 --- a/roles/jenkins-slave/files/jenkins-ssh-key +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDLga416xz0VwqhZ53+213YIv4vNnijuFdIpTEWz13C3+2yyUo33FVNP+d9R+vflAz4QMPrxW6NY4Nb9N6x6Nm0oZ+3XwUcfRWXvcUGL1BwaM9yhb9huGQWSc9heFXCZvlovG+guwKAmIr4bxDJ/WI11h4uyoSV0kUgWVQgHOJ4481WST/SG82w9d9m7T4SuePk/ENGuyM1BO2pE/cfOJeigoArKnNmVjUc86BUH3F/96LzttXajucyUJy+68NU4B+tpcVnmuCltoV6haB19ego6QDU1OHAwU7BxOvLSCZCJPgfyPz5BsYXZWz5evn8oxEfw5hNh/dEsl5h0850L+EKV7pj2whUS7obq1MmKCFoDEdiB4IF28eooYHJalTwY2LD8UZzpatknZc46V3EcLXXpcY5uTaZTXSaN8DM2cxlJuRsla7HOOPz1/xdZ9X93h56HmNUKAQjN0c2AciPqElEMnjw4oXzs23Cjk7GZBsJL5wyMnIJazgkI4Eq5r0D62j45unSBRd47KR0JS8ZY/I+hNg9y4+R0GDq1vq2Fswosq02jXhGWYK5oKUdFx8MCT/4LTb3tqyf7YC6lmEHGJiLmZ84TxTGgvqsKaojcCFUUo35Pr0N5oMQqVLBKIkvtiegafV+f+2xnnlQs4ozuyuS48Td9mDVUWFGBWmG+JD8iQ== jenkins@osm110 diff --git a/roles/jenkins-slave/files/run.sh b/roles/jenkins-slave/files/run.sh deleted file mode 100755 index 6c654325..00000000 --- a/roles/jenkins-slave/files/run.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec java -jar ~/slave.jar diff --git a/roles/jenkins-slave/files/sudoers b/roles/jenkins-slave/files/sudoers deleted file mode 100644 index a9000ffa..00000000 --- a/roles/jenkins-slave/files/sudoers +++ /dev/null @@ -1 +0,0 @@ -jenkins ALL=(osmose) NOPASSWD: ALL diff --git a/roles/jenkins-slave/tasks/main.yml b/roles/jenkins-slave/tasks/main.yml deleted file mode 100644 index cf18f2fe..00000000 --- a/roles/jenkins-slave/tasks/main.yml +++ /dev/null @@ -1,27 +0,0 @@ -- name: install packages - apt: pkg={{ item }} - with_items: - - openjdk-7-jre-headless - -- include: ../../../shared/project-account.yml user=jenkins - -- name: add sudoers to access osmose user - copy: src=sudoers dest=/etc/sudoers.d/jenkins-slave mode=0440 owner=root group=root validate='visudo -cf %s' - -- name: init ssh key to jenkins user - authorized_key: user=jenkins key="{{ item }}" - with_file: - - jenkins-ssh-key - -- name: init /data/work/jenkins/ sub path - file: path=/data/work/jenkins/{{ item }} state=directory owner=jenkins group=jenkins - with_items: - - tmp - -- name: get slave.jar - get_url: url=http://jenkins.osmose.openstreetmap.fr/jnlpJars/slave.jar dest=/data/project/jenkins/slave.jar - become: yes - become_user: jenkins - -- name: get run.sh - copy: src=run.sh dest=/data/project/jenkins/run.sh mode=0760 owner=jenkins group=jenkins From f77571980717fffb965a6c9c88810d217ec05c71 Mon Sep 17 00:00:00 2001 From: Jocelyn Jaubert Date: Sun, 19 Nov 2023 17:43:36 +0100 Subject: [PATCH 3/3] =?UTF-8?q?Suppresion=20r=C3=B4le=20phpbb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ce rôle était utilisé pour forum.openstreetmap.fr --- .config/ansible-lint-ignore.txt | 10 ---------- hosts | 3 --- phpbb.yml | 5 ----- roles/phpbb/files/apache.site | 20 -------------------- roles/phpbb/handlers/main.yml | 2 -- roles/phpbb/tasks/main.yml | 27 --------------------------- 6 files changed, 67 deletions(-) delete mode 100644 phpbb.yml delete mode 100644 roles/phpbb/files/apache.site delete mode 100644 roles/phpbb/handlers/main.yml delete mode 100644 roles/phpbb/tasks/main.yml diff --git a/.config/ansible-lint-ignore.txt b/.config/ansible-lint-ignore.txt index 4a95228c..3793a4a1 100644 --- a/.config/ansible-lint-ignore.txt +++ b/.config/ansible-lint-ignore.txt @@ -19,7 +19,6 @@ osmose-frontend.yml name[casing] osmosis.yml name[casing] overpass-api.yml name[casing] peertube.yml name[casing] -phpbb.yml name[casing] polygons.yml name[casing] postgresql.yml name[casing] proxmox-backup.yml name[casing] @@ -327,15 +326,6 @@ roles/overpass-api/tasks/set_up_database.yml risky-file-permissions roles/overpass-api/tasks/web.yml fqcn[action-core] roles/overpass-api/tasks/web.yml name[casing] roles/overpass-api/tasks/web.yml risky-file-permissions -roles/phpbb/handlers/main.yml fqcn[action-core] -roles/phpbb/handlers/main.yml name[casing] -roles/phpbb/handlers/main.yml no-free-form -roles/phpbb/tasks/main.yml deprecated-module -roles/phpbb/tasks/main.yml fqcn[action-core] -roles/phpbb/tasks/main.yml name[casing] -roles/phpbb/tasks/main.yml name[missing] -roles/phpbb/tasks/main.yml no-free-form -roles/phpbb/tasks/main.yml risky-file-permissions roles/polygons/handlers/main.yml fqcn[action-core] roles/polygons/handlers/main.yml name[casing] roles/polygons/handlers/main.yml no-free-form diff --git a/hosts b/hosts index abfb4650..ce2da5e0 100644 --- a/hosts +++ b/hosts @@ -161,9 +161,6 @@ osm146.openstreetmap.fr # for prev.openstreetmap.fr [export-cadastre] cadastre.vm.openstreetmap.fr -[phpbb] -osm139.openstreetmap.fr # for forum.openstreetmap.fr - [geoosm] osm167.openstreetmap.fr diff --git a/phpbb.yml b/phpbb.yml deleted file mode 100644 index 13f4818a..00000000 --- a/phpbb.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: phpbb configuration - hosts: phpbb - become: yes - roles: - - phpbb diff --git a/roles/phpbb/files/apache.site b/roles/phpbb/files/apache.site deleted file mode 100644 index 9311823c..00000000 --- a/roles/phpbb/files/apache.site +++ /dev/null @@ -1,20 +0,0 @@ - - ServerAdmin webmaster@localhost - - ServerName forum.openstreetmap.fr - ServerAlias dev.forum.openstreetmap.fr - - DocumentRoot /data/project/forum/phpBB3/ - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Require all granted - - - AccessFileName .htaccess - - LogLevel warn - ErrorLog /var/log/apache2/forum-error.log - CustomLog /var/log/apache2/forum-access.log combined - - diff --git a/roles/phpbb/handlers/main.yml b/roles/phpbb/handlers/main.yml deleted file mode 100644 index 8334e9df..00000000 --- a/roles/phpbb/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -- name: restart apache - service: name=apache2 state=restarted diff --git a/roles/phpbb/tasks/main.yml b/roles/phpbb/tasks/main.yml deleted file mode 100644 index 523d3a0a..00000000 --- a/roles/phpbb/tasks/main.yml +++ /dev/null @@ -1,27 +0,0 @@ -- name: install packages - apt: pkg={{ item }} - with_items: - - apache2 - - mysql-server - -- include: ../../../shared/project-account.yml user=forum - - -# install phpBB3 manually in /data/project/forum/phpBB3 -- name: check if phpBB3 was installed - stat: - path: /data/project/forum/phpBB3 - register: p - -- fail: - msg: "Please install phpBB3 by decompressing a .zip from https://www.phpbb.com/downloads/ in /data/project/forum/" - when: not (p.stat.isdir is defined and p.stat.isdir) - - -- name: copy apache config - copy: src=apache.site dest="/etc/apache2/sites-available/forum.conf" - notify: restart apache - -- name: enable apache site - file: src="/etc/apache2/sites-available/forum.conf" dest="/etc/apache2/sites-enabled/forum.conf" state=link - notify: restart apache