main
David Vargas 2022-11-25 12:07:09 +00:00
parent e8865cb4aa
commit 4ef9293f8b
2 changed files with 41 additions and 0 deletions

19
test/services.rb Executable file
View File

@ -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

22
test/services.yaml Normal file
View File

@ -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