From afc6b3f57fa15b60d7609bb38767c24ff0bf574d Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Sun, 3 Sep 2017 14:35:56 +0200 Subject: [PATCH] Modify librenms and racktables for Debian stretch. --- roles/librenms/tasks/main.yml | 22 +++++++++++----------- roles/librenms/templates/vhost.j2 | 2 +- roles/racktables/tasks/main.yml | 19 ++++++++++--------- roles/racktables/templates/vhost.j2 | 2 +- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/roles/librenms/tasks/main.yml b/roles/librenms/tasks/main.yml index 07fe9c8..584d1de 100644 --- a/roles/librenms/tasks/main.yml +++ b/roles/librenms/tasks/main.yml @@ -13,14 +13,14 @@ - php-net-ipv4 - php-net-ipv6 - php-pear - - php5-cli - - php5-curl - - php5-fpm - - php5-gd - - php5-json - - php5-mcrypt - - php5-mysql - - php5-snmp + - php7.0-cli + - php7.0-curl + - php7.0-fpm + - php7.0-gd + - php7.0-json + - php7.0-mcrypt + - php7.0-mysql + - php7.0-snmp - python-mysqldb - rrdtool - snmp @@ -40,7 +40,7 @@ git: repo=https://github.com/librenms/librenms.git dest=/usr/share/librenms depth=1 update=no - name: Ensure rrd directory exists - file: path=/var/lib/librenms/rrd owner=librenms group=librenms mode=0775 state=directory + file: path=/var/lib/librenms/rrd owner=librenms group=www-data mode=0775 state=directory - name: Ensure rrd link exists file: src=/var/lib/librenms/rrd dest=/usr/share/librenms/rrd state=link @@ -56,5 +56,5 @@ file: src=/etc/nginx/sites-available/librenms dest=/etc/nginx/sites-enabled/librenms state=link notify: Restart nginx -- name: Start php5-fpm - service: name=php5-fpm state=started enabled=yes +- name: Start php7.0-fpm + service: name=php7.0-fpm state=started enabled=yes diff --git a/roles/librenms/templates/vhost.j2 b/roles/librenms/templates/vhost.j2 index af96a46..d7d457b 100644 --- a/roles/librenms/templates/vhost.j2 +++ b/roles/librenms/templates/vhost.j2 @@ -17,7 +17,7 @@ server { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_intercept_errors on; } diff --git a/roles/racktables/tasks/main.yml b/roles/racktables/tasks/main.yml index 1f523da..27648c8 100644 --- a/roles/racktables/tasks/main.yml +++ b/roles/racktables/tasks/main.yml @@ -4,11 +4,12 @@ apt: name={{ item }} with_items: - mysql-server - - php5-fpm - - php5-gd - - php5-ldap - - php5-mysql - - php5-snmp + - php7.0-fpm + - php7.0-gd + - php7.0-ldap + - php7.0-mbstring + - php7.0-mysql + - php7.0-snmp - python-mysqldb - name: Configure MySQL database @@ -18,13 +19,13 @@ mysql_user: name={{ racktables_dbuser }} password={{ racktables_dbpass }} priv={{ racktables_dbname }}.*:ALL state=present - name: Unpack RackTables - unarchive: src=http://heanet.dl.sourceforge.net/project/racktables/RackTables-0.20.11.tar.gz dest=/opt copy=no + unarchive: src=http://heanet.dl.sourceforge.net/project/racktables/RackTables-0.20.11.tar.gz dest=/opt creates=/opt/RackTables-0.20.11/README remote_src=yes - name: Create link file: src=/opt/RackTables-0.20.11 dest=/opt/racktables state=link - name: Configure RackTables - template: src=secret.php.j2 dest=/opt/RackTables-0.20.11/wwwroot/inc/secret.php owner=www-data group=www-data mode=0400 + template: src=secret.php.j2 dest=/opt/racktables/wwwroot/inc/secret.php owner=www-data group=www-data mode=0400 - name: Configure vhost template: src=vhost.j2 dest=/etc/nginx/sites-available/racktables @@ -34,5 +35,5 @@ file: src=/etc/nginx/sites-available/racktables dest=/etc/nginx/sites-enabled/racktables state=link notify: Restart nginx -- name: Start php5-fpm - service: name=php5-fpm state=started enabled=yes +- name: Start php7.0-fpm + service: name=php7.0-fpm state=started enabled=yes diff --git a/roles/racktables/templates/vhost.j2 b/roles/racktables/templates/vhost.j2 index a4cd9f3..7757aec 100644 --- a/roles/racktables/templates/vhost.j2 +++ b/roles/racktables/templates/vhost.j2 @@ -13,7 +13,7 @@ server { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_intercept_errors on; } }