|
99 | 99 | 'webroot': { |
100 | 100 | $_plugin_args = zip($domains, $webroot_paths).map |$domain| { |
101 | 101 | if $domain[1] { |
102 | | - "--webroot-path ${domain[1]} -d ${domain[0]}" |
| 102 | + "--webroot-path ${domain[1]} -d '${domain[0]}'" |
103 | 103 | } else { |
104 | | - "-d ${domain[0]}" |
| 104 | + "-d '${domain[0]}'" |
105 | 105 | } |
106 | 106 | } |
107 | | - $plugin_args = ["--cert-name ${title}"] + $_plugin_args |
| 107 | + $plugin_args = ["--cert-name '${title}'"] + $_plugin_args |
108 | 108 | } |
109 | 109 |
|
110 | 110 | 'dns-rfc2136': { |
111 | 111 | require letsencrypt::plugin::dns_rfc2136 |
| 112 | + $_domains = join($domains, '\' -d \'') |
112 | 113 | $plugin_args = [ |
113 | | - "--cert-name ${title} -d", |
114 | | - join($domains, ' -d '), |
| 114 | + "--cert-name '${title}' -d", |
| 115 | + "'${_domains}'", |
115 | 116 | "--dns-rfc2136-credentials ${letsencrypt::plugin::dns_rfc2136::config_dir}/dns-rfc2136.ini", |
116 | 117 | "--dns-rfc2136-propagation-seconds ${letsencrypt::plugin::dns_rfc2136::propagation_seconds}", |
117 | 118 | ] |
118 | 119 | } |
119 | 120 |
|
120 | 121 | default: { |
121 | 122 | if $ensure == 'present' { |
122 | | - $_plugin_args = join($domains, ' -d ') |
123 | | - $plugin_args = "--cert-name ${title} -d ${_plugin_args}" |
| 123 | + $_domains = join($domains, '\' -d \'') |
| 124 | + $plugin_args = "--cert-name '${title}' -d '${_domains}'" |
124 | 125 | } else { |
125 | | - $plugin_args = "--cert-name ${title}" |
| 126 | + $plugin_args = "--cert-name '${title}'" |
126 | 127 | } |
127 | 128 | } |
128 | 129 | } |
|
158 | 159 | $command = join($_command, ' ') |
159 | 160 |
|
160 | 161 | $execution_environment = [ "VENV_PATH=${letsencrypt::venv_path}", ] + $environment |
161 | | - $verify_domains = join(unique($domains), ' ') |
| 162 | + $verify_domains = join(unique($domains), '\' \'') |
162 | 163 |
|
163 | 164 | if $ensure == 'present' { |
164 | | - $exec_ensure = { 'unless' => "/usr/local/sbin/letsencrypt-domain-validation ${live_path} ${verify_domains}" } |
| 165 | + $exec_ensure = { 'unless' => "/usr/local/sbin/letsencrypt-domain-validation ${live_path} '${verify_domains}'" } |
165 | 166 | } else { |
166 | | - $exec_ensure = { 'onlyif' => "/usr/local/sbin/letsencrypt-domain-validation ${live_path} ${verify_domains}" } |
| 167 | + $exec_ensure = { 'onlyif' => "/usr/local/sbin/letsencrypt-domain-validation ${live_path} '${verify_domains}'" } |
167 | 168 | } |
168 | 169 |
|
169 | 170 | exec { "letsencrypt certonly ${title}": |
|
0 commit comments