From 4ef9293f8b276a9d7771c4dc806b7a90eaa38c9c Mon Sep 17 00:00:00 2001 From: David Vargas Date: Fri, 25 Nov 2022 12:07:09 +0000 Subject: [PATCH] [N] . --- test/services.rb | 19 +++++++++++++++++++ test/services.yaml | 22 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100755 test/services.rb create mode 100644 test/services.yaml diff --git a/test/services.rb b/test/services.rb new file mode 100755 index 0000000..a5e14ea --- /dev/null +++ b/test/services.rb @@ -0,0 +1,19 @@ +#!/usr/bin/env ruby +require "yaml" + +filename = File.join(File.dirname(__FILE__), "services.yaml") +settings = YAML.load(File.read(filename)) + +services = settings["services"] +services.each_pair do |key, value| + print "==> #{key} " + cmd = "host #{value['ip']}| grep #{value['hostname']}| wc -l" + counter = %x[#{cmd}].to_i + if counter.zero? + puts "(ERROR: IP <=> hostname)" + puts " hostname = #{value['hostname']}" + puts " ip = #{value['ip']}" + else + puts "(Ok)" + end +end diff --git a/test/services.yaml b/test/services.yaml new file mode 100644 index 0000000..fbfe001 --- /dev/null +++ b/test/services.yaml @@ -0,0 +1,22 @@ +services: + nextcloud: + hostname: docs.txs.es + ip: 78.47.40.72 + features: + - Documentos en la nube + - OpenCollectives (Cuadernos) + editorcollab: + hostname: editor.educatic.txs.es + ip: 78.47.204.43 + features: + - Documentos en la nube + - Collabora + mini: + hostname: editor.educar.encanarias.info + ip: 78.46.183.113 + correo: + hostname: correo.txs.es + ip: 88.99.189.54 + git: + hostname: git.txs.es + ip: 78.47.176.180