Исправлена ошибка при открытии ansible.cfg, если отсутствует inventory файл упомянутый там.

This commit is contained in:
svkalinin 2022-11-29 08:59:54 +03:00
parent 64c9957991
commit c7fb966326

View File

@ -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]) \