-
Notifications
You must be signed in to change notification settings - Fork 1
/
adhoc-lab-solutions.html
276 lines (276 loc) · 24.3 KB
/
adhoc-lab-solutions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Ad-hoc lab solutions</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<style type="text/css">
a.sourceLine { display: inline-block; line-height: 1.25; }
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
a.sourceLine:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
a.sourceLine { text-indent: -1em; padding-left: 1em; }
}
pre.numberSource a.sourceLine
{ position: relative; left: -4em; }
pre.numberSource a.sourceLine::before
{ content: attr(title);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; pointer-events: all; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
a.sourceLine::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
</head>
<body>
<header id="title-block-header">
<h1 class="title">Ad-hoc lab solutions</h1>
</header>
<h2 id="lab-variables-and-patterns">Lab: Variables and patterns</h2>
<ul class="incremental">
<li>Add a custom variable for the <code>Role_app</code> group and view it using the <code>debug</code> command (<code>ansible Role_app -m debug -a var=VARNAME</code>)</li>
</ul>
<p>Update the inventory.yaml file to include the following contents:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode yaml"><code class="sourceCode yaml"><a class="sourceLine" id="cb1-1" title="1"><span class="co">...</span></a>
<a class="sourceLine" id="cb1-2" title="2"><span class="co">Role_app:</span></a>
<a class="sourceLine" id="cb1-3" title="3"><span class="co"> vars:</span></a>
<a class="sourceLine" id="cb1-4" title="4"><span class="co"> name: app-server</span></a>
<a class="sourceLine" id="cb1-5" title="5"><span class="co"> my_new_variable_name: my-new-variable-value</span></a>
<a class="sourceLine" id="cb1-6" title="6"><span class="co">...</span></a></code></pre></div>
<ul class="incremental">
<li>Target all the servers using <code>ansible all</code> and view the value of your new variable (<code>ansible all -m debug -a var=VARNAME</code>)</li>
</ul>
<div class="sourceCode" id="cb2"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb2-1" title="1">$ <span class="ex">ansible</span> all -m debug -a var=my-new-variable-value</a>
<a class="sourceLine" id="cb2-2" title="2"><span class="ex">ansible</span> <span class="kw">|</span> <span class="ex">SUCCESS</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb2-3" title="3"> <span class="st">"my_new_variable_name"</span>: <span class="st">"VARIABLE IS NOT DEFINED!"</span></a>
<a class="sourceLine" id="cb2-4" title="4">}</a>
<a class="sourceLine" id="cb2-5" title="5"><span class="ex">...</span></a>
<a class="sourceLine" id="cb2-6" title="6"><span class="ex">web-1</span> <span class="kw">|</span> <span class="ex">SUCCESS</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb2-7" title="7"> <span class="st">"my_new_variable_name"</span>: <span class="st">"VARIABLE IS NOT DEFINED!"</span></a>
<a class="sourceLine" id="cb2-8" title="8">}</a>
<a class="sourceLine" id="cb2-9" title="9"><span class="ex">app-0</span> <span class="kw">|</span> <span class="ex">SUCCESS</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb2-10" title="10"> <span class="st">"my_new_variable_name"</span>: <span class="st">"my-new-variable-value"</span></a>
<a class="sourceLine" id="cb2-11" title="11">}</a>
<a class="sourceLine" id="cb2-12" title="12"><span class="ex">hhannani</span> <span class="kw">|</span> <span class="ex">SUCCESS</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb2-13" title="13"> <span class="st">"my_new_variable_name"</span>: <span class="st">"VARIABLE IS NOT DEFINED!"</span></a>
<a class="sourceLine" id="cb2-14" title="14">}</a>
<a class="sourceLine" id="cb2-15" title="15"><span class="ex">db-1</span> <span class="kw">|</span> <span class="ex">SUCCESS</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb2-16" title="16"> <span class="st">"my_new_variable_name"</span>: <span class="st">"VARIABLE IS NOT DEFINED!"</span></a>
<a class="sourceLine" id="cb2-17" title="17">}</a>
<a class="sourceLine" id="cb2-18" title="18"><span class="ex">app-1</span> <span class="kw">|</span> <span class="ex">SUCCESS</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb2-19" title="19"> <span class="st">"my_new_variable_name"</span>: <span class="st">"my-new-variable-value"</span></a>
<a class="sourceLine" id="cb2-20" title="20">}</a>
<a class="sourceLine" id="cb2-21" title="21"><span class="ex">kishore</span> <span class="kw">|</span> <span class="ex">SUCCESS</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb2-22" title="22"> <span class="st">"my_new_variable_name"</span>: <span class="st">"VARIABLE IS NOT DEFINED!"</span></a>
<a class="sourceLine" id="cb2-23" title="23">}</a>
<a class="sourceLine" id="cb2-24" title="24"><span class="ex">...</span></a></code></pre></div>
<h2 id="lab-more-variables">Lab: more variables</h2>
<ul class="incremental">
<li>Create a <code>host_vars</code> directory with a file web-0.yaml in it.
<ul class="incremental">
<li>Set some variables in the web-0.yaml file and verify that they appear with <code>ansible web-0 -m debug...</code></li>
</ul></li>
<li>Create a <code>group_vars</code> directory with a subdirectory <code>all</code>
<ul class="incremental">
<li>Create a few files inside <code>group_vars/all</code> and verify that the variables are applied to all hosts using <code>ansible all -m debug ...</code></li>
</ul></li>
</ul>
<p><strong>For the file changes above, see the file src/data/ansible-examples/host_group_vars.zip</strong></p>
<p>To test:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb3-1" title="1">$ <span class="ex">ansible</span> web-0 -m debug -a var=var0</a>
<a class="sourceLine" id="cb3-2" title="2"><span class="ex">web-0</span> <span class="kw">|</span> <span class="ex">SUCCESS</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb3-3" title="3"> <span class="st">"var0"</span>:<span class="bu"> [</span></a>
<a class="sourceLine" id="cb3-4" title="4"> 1,</a>
<a class="sourceLine" id="cb3-5" title="5"> 2,</a>
<a class="sourceLine" id="cb3-6" title="6"> 3</a>
<a class="sourceLine" id="cb3-7" title="7"> ]</a>
<a class="sourceLine" id="cb3-8" title="8">}</a>
<a class="sourceLine" id="cb3-9" title="9">$ ansible web-0 -m debug <span class="ot">-a</span> var=allvar1</a>
<a class="sourceLine" id="cb3-10" title="10">web-0 | SUCCESS =<span class="ot">></span> {</a>
<a class="sourceLine" id="cb3-11" title="11"> <span class="st">"allvar1"</span>: <span class="st">"bar"</span></a>
<a class="sourceLine" id="cb3-12" title="12">}</a></code></pre></div>
<h2 id="lab-ad-hoc-commands">Lab: Ad-hoc Commands</h2>
<p>Using Ansible one-off commands:</p>
<ul class="incremental">
<li>Create a user for yourself on “your” server</li>
<li>Verify that you can ssh to your new account</li>
<li>Check out the class repository to your user’s account (https://github.com/Arborian/ansible-class.git)</li>
<li>Install and start nginx in your host</li>
<li>Verify that it is working by visiting your server with a web browser</li>
</ul>
<h3 id="solution">Solution</h3>
<p>(Assuming your username is gertrude and your server is the salesforce.training.arborian.com server)</p>
<p>Create user:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb4-1" title="1">$ <span class="ex">ansible</span> --become salesforce -m user -a <span class="st">'name=gertrude shell=/usr/bin/bash'</span></a>
<a class="sourceLine" id="cb4-2" title="2"><span class="ex">salesforce</span> <span class="kw">|</span> <span class="ex">CHANGED</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb4-3" title="3"> <span class="st">"ansible_facts"</span>: <span class="kw">{</span></a>
<a class="sourceLine" id="cb4-4" title="4"> <span class="st">"discovered_interpreter_python"</span>: <span class="st">"/usr/bin/python"</span></a>
<a class="sourceLine" id="cb4-5" title="5"> <span class="kw">}</span>,</a>
<a class="sourceLine" id="cb4-6" title="6"> <span class="st">"changed"</span>: <span class="fu">true</span>,</a>
<a class="sourceLine" id="cb4-7" title="7"> <span class="st">"comment"</span>: <span class="st">""</span>,</a>
<a class="sourceLine" id="cb4-8" title="8"> <span class="st">"create_home"</span>: <span class="fu">true</span>,</a>
<a class="sourceLine" id="cb4-9" title="9"> <span class="st">"group"</span>: <span class="ex">1004</span>,</a>
<a class="sourceLine" id="cb4-10" title="10"> <span class="st">"home"</span>: <span class="st">"/home/gertrude"</span>,</a>
<a class="sourceLine" id="cb4-11" title="11"> <span class="st">"name"</span>: <span class="st">"gertrude"</span>,</a>
<a class="sourceLine" id="cb4-12" title="12"> <span class="st">"shell"</span>: <span class="st">"/usr/bin/bash"</span>,</a>
<a class="sourceLine" id="cb4-13" title="13"> <span class="st">"state"</span>: <span class="st">"present"</span>,</a>
<a class="sourceLine" id="cb4-14" title="14"> <span class="st">"system"</span>: <span class="fu">false</span>,</a>
<a class="sourceLine" id="cb4-15" title="15"> <span class="st">"uid"</span>: <span class="ex">1004</span></a>
<a class="sourceLine" id="cb4-16" title="16">}</a></code></pre></div>
<p>Authorize public key:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb5-1" title="1">$ <span class="ex">ansible</span> --become salesforce -m authorized_key -a <span class="st">'user=gertrude key={{lookup("file", "../class-keypair-public")}}'</span></a>
<a class="sourceLine" id="cb5-2" title="2"><span class="ex">salesforce</span> <span class="kw">|</span> <span class="ex">CHANGED</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb5-3" title="3"> <span class="st">"ansible_facts"</span>: <span class="kw">{</span></a>
<a class="sourceLine" id="cb5-4" title="4"> <span class="st">"discovered_interpreter_python"</span>: <span class="st">"/usr/bin/python"</span></a>
<a class="sourceLine" id="cb5-5" title="5"> <span class="kw">}</span>,</a>
<a class="sourceLine" id="cb5-6" title="6"></a>
<a class="sourceLine" id="cb5-7" title="7"><span class="ex">...</span></a>
<a class="sourceLine" id="cb5-8" title="8"> <span class="st">"user"</span>: <span class="st">"gertrude"</span>,</a>
<a class="sourceLine" id="cb5-9" title="9"> <span class="st">"validate_certs"</span>: <span class="fu">true</span></a>
<a class="sourceLine" id="cb5-10" title="10">}</a></code></pre></div>
<p>Verify ssh access:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb6-1" title="1">$ <span class="fu">ssh</span> -i ../class-keypair.pem [email protected]</a>
<a class="sourceLine" id="cb6-2" title="2"><span class="ex">Warning</span>: untrusted X11 forwarding setup failed: xauth key data not generated</a>
<a class="sourceLine" id="cb6-3" title="3">[<span class="ex">gertrude@ip-172-30-1-193</span> ~]$ exit</a>
<a class="sourceLine" id="cb6-4" title="4"><span class="bu">logout</span></a>
<a class="sourceLine" id="cb6-5" title="5"><span class="ex">Connection</span> to salesforce.training.arborian.com closed.</a></code></pre></div>
<p>Checkout git repo:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb7-1" title="1">$ <span class="ex">ansible</span> salesforce -m git --become --become-user gertrude -a <span class="st">'name=https://github.com/Arborian/ansible-class.git dest=~/ansible-class'</span></a>
<a class="sourceLine" id="cb7-2" title="2">[<span class="ex">WARNING</span>]: Module remote_tmp /home/gertrude/.ansible/tmp did not exist and was</a>
<a class="sourceLine" id="cb7-3" title="3"><span class="ex">created</span> with a mode</a>
<a class="sourceLine" id="cb7-4" title="4"><span class="ex">of</span> 0700, this may cause issues when running as another user. To avoid this,</a>
<a class="sourceLine" id="cb7-5" title="5"><span class="ex">create</span> the remote_tmp</a>
<a class="sourceLine" id="cb7-6" title="6"><span class="fu">dir</span> with the correct permissions manually</a>
<a class="sourceLine" id="cb7-7" title="7"><span class="ex">salesforce</span> <span class="kw">|</span> <span class="ex">CHANGED</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb7-8" title="8"> <span class="st">"after"</span>: <span class="st">"566fee5ee9173c36595947e7fca667dc4a7025d9"</span>,</a>
<a class="sourceLine" id="cb7-9" title="9"> <span class="st">"ansible_facts"</span>: <span class="kw">{</span></a>
<a class="sourceLine" id="cb7-10" title="10"> <span class="st">"discovered_interpreter_python"</span>: <span class="st">"/usr/bin/python"</span></a>
<a class="sourceLine" id="cb7-11" title="11"> <span class="kw">}</span>,</a>
<a class="sourceLine" id="cb7-12" title="12"> <span class="st">"before"</span>: <span class="ex">null</span>,</a>
<a class="sourceLine" id="cb7-13" title="13"> <span class="st">"changed"</span>: <span class="fu">true</span></a>
<a class="sourceLine" id="cb7-14" title="14">}</a></code></pre></div>
<p>Install nginx (requires instsall of epel-release first):</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb8-1" title="1">$ <span class="ex">ansible</span> salesforce --become -m yum -a <span class="st">'name=epel-release'</span>salesforce <span class="kw">|</span> <span class="ex">CHANGED</span></a>
<a class="sourceLine" id="cb8-2" title="2">=<span class="op">></span> <span class="kw">{</span></a>
<a class="sourceLine" id="cb8-3" title="3"> <span class="st">"ansible_facts"</span>: <span class="kw">{</span></a>
<a class="sourceLine" id="cb8-4" title="4"> <span class="st">"discovered_interpreter_python"</span>: <span class="st">"/usr/bin/python"</span></a>
<a class="sourceLine" id="cb8-5" title="5"> <span class="kw">}</span>,</a>
<a class="sourceLine" id="cb8-6" title="6"> <span class="st">"changed"</span>: <span class="fu">true</span>,</a>
<a class="sourceLine" id="cb8-7" title="7"> <span class="st">"changes"</span>: <span class="kw">{</span></a>
<a class="sourceLine" id="cb8-8" title="8"> <span class="st">"installed"</span>:<span class="bu"> [</span></a>
<a class="sourceLine" id="cb8-9" title="9"> <span class="st">"epel-release"</span></a>
<a class="sourceLine" id="cb8-10" title="10"> ]</a>
<a class="sourceLine" id="cb8-11" title="11"> },</a>
<a class="sourceLine" id="cb8-12" title="12"> <span class="st">"msg"</span>: <span class="st">""</span>,</a>
<a class="sourceLine" id="cb8-13" title="13"> <span class="st">"rc"</span>: 0,</a>
<a class="sourceLine" id="cb8-14" title="14"> <span class="st">"results"</span>: [</a>
<a class="sourceLine" id="cb8-15" title="15"> <span class="st">"Loaded plugins: fastestmirror\nLoading mirror speeds from cached</span></a>
<a class="sourceLine" id="cb8-16" title="16"><span class="st">hostfile\n * base: d36uatko69830t.cloudfront.net\n * extras:</span></a>
<a class="sourceLine" id="cb8-17" title="17"><span class="st">...</span></a>
<a class="sourceLine" id="cb8-18" title="18"><span class="st">\n\nComplete!\n"</span></a>
<a class="sourceLine" id="cb8-19" title="19"> ]</a>
<a class="sourceLine" id="cb8-20" title="20">}</a></code></pre></div>
<div class="sourceCode" id="cb9"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb9-1" title="1">$ <span class="ex">ansible</span> salesforce --become -m yum -a <span class="st">'name=nginx'</span></a>
<a class="sourceLine" id="cb9-2" title="2"><span class="ex">salesforce</span> <span class="kw">|</span> <span class="ex">CHANGED</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb9-3" title="3"> <span class="st">"ansible_facts"</span>: <span class="kw">{</span></a>
<a class="sourceLine" id="cb9-4" title="4"> <span class="st">"discovered_interpreter_python"</span>: <span class="st">"/usr/bin/python"</span></a>
<a class="sourceLine" id="cb9-5" title="5"> <span class="kw">}</span>,</a>
<a class="sourceLine" id="cb9-6" title="6"> <span class="st">"changed"</span>: <span class="fu">true</span>,</a>
<a class="sourceLine" id="cb9-7" title="7"> <span class="st">"changes"</span>: <span class="kw">{</span></a>
<a class="sourceLine" id="cb9-8" title="8"> <span class="st">"installed"</span>:<span class="bu"> [</span></a>
<a class="sourceLine" id="cb9-9" title="9"> <span class="st">"nginx"</span></a>
<a class="sourceLine" id="cb9-10" title="10"> ]</a>
<a class="sourceLine" id="cb9-11" title="11"> },</a>
<a class="sourceLine" id="cb9-12" title="12"> <span class="st">"msg"</span>: <span class="st">"warning:</span></a>
<a class="sourceLine" id="cb9-13" title="13"><span class="st">/var/cache/yum/x86_64/7/epel/packages/nginx-1.16.1-1.el7.x86_64.rpm: Header V3</span></a>
<a class="sourceLine" id="cb9-14" title="14"><span class="st">...</span></a>
<a class="sourceLine" id="cb9-15" title="15"><span class="st">\n nginx-mod-http-perl.x86_64 1:1.16.1-1.el7</span></a>
<a class="sourceLine" id="cb9-16" title="16"><span class="st">\n nginx-mod-http-xslt-filter.x86_64 1:1.16.1-1.el7</span></a>
<a class="sourceLine" id="cb9-17" title="17"><span class="st">\n nginx-mod-mail.x86_64 1:1.16.1-1.el7 \n nginx-mod-stream.x86_64</span></a>
<a class="sourceLine" id="cb9-18" title="18"><span class="st">1:1.16.1-1.el7 \n\nComplete!\n"</span></a>
<a class="sourceLine" id="cb9-19" title="19"> ]</a>
<a class="sourceLine" id="cb9-20" title="20">}</a></code></pre></div>
<p>Start nginx service</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb10-1" title="1">$ <span class="ex">ansible</span> salesforce --become -m service -a <span class="st">'name=nginx state=started'</span></a>
<a class="sourceLine" id="cb10-2" title="2"><span class="ex">salesforce</span> <span class="kw">|</span> <span class="ex">CHANGED</span> =<span class="op">></span> {</a>
<a class="sourceLine" id="cb10-3" title="3"> <span class="st">"ansible_facts"</span>: <span class="kw">{</span></a>
<a class="sourceLine" id="cb10-4" title="4"> <span class="st">"discovered_interpreter_python"</span>: <span class="st">"/usr/bin/python"</span></a>
<a class="sourceLine" id="cb10-5" title="5"> <span class="kw">}</span>,</a>
<a class="sourceLine" id="cb10-6" title="6"> <span class="st">"changed"</span>: <span class="fu">true</span>,</a>
<a class="sourceLine" id="cb10-7" title="7"> <span class="st">"name"</span>: <span class="st">"nginx"</span>,</a>
<a class="sourceLine" id="cb10-8" title="8"> <span class="st">"state"</span>: <span class="st">"started"</span>,</a>
<a class="sourceLine" id="cb10-9" title="9"> <span class="st">"status"</span>: <span class="kw">{</span></a>
<a class="sourceLine" id="cb10-10" title="10"><span class="ex">...</span></a>
<a class="sourceLine" id="cb10-11" title="11"> <span class="st">"UnitFileState"</span>: <span class="st">"disabled"</span>,</a>
<a class="sourceLine" id="cb10-12" title="12"> <span class="st">"WatchdogTimestampMonotonic"</span>: <span class="st">"0"</span>,</a>
<a class="sourceLine" id="cb10-13" title="13"> <span class="st">"WatchdogUSec"</span>: <span class="st">"0"</span></a>
<a class="sourceLine" id="cb10-14" title="14"> <span class="kw">}</span></a>
<a class="sourceLine" id="cb10-15" title="15">}</a></code></pre></div>
<p>Verify connectivity at http://salesforce.training.arborian.com</p>
<p>Alternatively, try using cURL:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb11-1" title="1">$ <span class="ex">curl</span> -i http://salesforce.training.arborian.com</a>
<a class="sourceLine" id="cb11-2" title="2"><span class="ex">HTTP/1.1</span> 200 OK</a>
<a class="sourceLine" id="cb11-3" title="3"><span class="ex">Server</span>: nginx/1.16.1</a>
<a class="sourceLine" id="cb11-4" title="4"><span class="ex">Date</span>: Tue, 22 Sep 2020 15:03:30 GMT</a>
<a class="sourceLine" id="cb11-5" title="5"><span class="ex">Content-Type</span>: text/html</a>
<a class="sourceLine" id="cb11-6" title="6"><span class="ex">Content-Length</span>: 4833</a>
<a class="sourceLine" id="cb11-7" title="7"><span class="ex">Last-Modified</span>: Fri, 16 May 2014 15:12:48 GMT</a>
<a class="sourceLine" id="cb11-8" title="8"><span class="ex">Connection</span>: keep-alive</a>
<a class="sourceLine" id="cb11-9" title="9"><span class="ex">ETag</span>: <span class="st">"53762af0-12e1"</span></a>
<a class="sourceLine" id="cb11-10" title="10"><span class="ex">Accept-Ranges</span>: bytes</a>
<a class="sourceLine" id="cb11-11" title="11"><span class="ex">...</span></a></code></pre></div>
</body>
</html>