From c7fb966326a70cbec91b78bb3ae7c61a60e99517 Mon Sep 17 00:00:00 2001 From: svkalinin Date: Tue, 29 Nov 2022 08:59:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=20=D0=BE=D1=82=D0=BA=D1=80=D1=8B=D1=82=D0=B8?= =?UTF-8?q?=D0=B8=20ansible.cfg,=20=D0=B5=D1=81=D0=BB=D0=B8=20=D0=BE=D1=82?= =?UTF-8?q?=D1=81=D1=83=D1=82=D1=81=D1=82=D0=B2=D1=83=D0=B5=D1=82=20invent?= =?UTF-8?q?ory=20=D1=84=D0=B0=D0=B9=D0=BB=20=D1=83=D0=BF=D0=BE=D0=BC=D1=8F?= =?UTF-8?q?=D0=BD=D1=83=D1=82=D1=8B=D0=B9=20=D1=82=D0=B0=D0=BC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/readstructure.tcl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/readstructure.tcl b/lib/readstructure.tcl index cb11767..40bd75c 100644 --- a/lib/readstructure.tcl +++ b/lib/readstructure.tcl @@ -141,6 +141,10 @@ proc ReadFilesFromDirectory {directory root {type ""}} { while {[gets $f line] >= 0} { if [regexp -nocase -all -- {^\s*inventory\s*=\s*(\.\/|)(.+?)$} $line match v1 fileName] { # puts "Inventory file is a: $line" + if ![file exists [file join $root $directory $fileName]] { + ShowMessage "Error in ansible.cfg" "Inventory File '[file join $root $directory $fileName]' does not exists" + continue + } if {[lsearch $project($root) [file join $root $directory $fileName]] eq "-1"} { lappend project($root) [file join $root $directory $fileName] set variables([file join $root $directory $fileName]) \