[英]Puppet - silently exit if the source is not available
Is it possible to silently exit if the source file is not available.如果源文件不可用,是否可以静默退出。
For example:例如:
file {"/tmp/skin-${version}_${theme}.zip":
source => "${file_location}/skin-${version}_${theme}.zip",
ensure => file,
mode => '0700'
}
->
exec {"commands":
Here I will be processing the above downloaded file, if the url is not valid this block should not execute.
}
In the above example if the file -> source url is not available, this should silently exit without any error.在上面的示例中,如果文件 -> 源 url 不可用,则应该无提示地退出而不会出现任何错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.