/dhall-infra/Connection/hasProxy.dhall

Copy path to clipboard

Check if a connection use a proxy

Examples

hasProxy Connection::{ ansible_user = "fedora" } === False

Source

--| Check if a connection use a proxy
let Connection = { Type = ./Type.dhall, default = ./default.dhall }

let hasProxy
: Connection.Type -> Bool
= \(conn : ./Type.dhall) ->
merge
{ None = False, Some = \(proxy : Text) -> True }
conn.proxy_command

let example0 =
assert : hasProxy Connection::{ ansible_user = "fedora" } === False

in hasProxy