Skip to content

Commit 917dd50

Browse files
committed
tiny bit on ansible installation
1 parent 11328b9 commit 917dd50

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

chapter_11_ansible.asciidoc

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ I promise seeing your site on a "real" website will be a thrill.
7070

7171
=== Manually Provisioning a Server to Host Our Site
7272

73-
// TODO: revise this section
73+
// TODO: revise this section? I used to assume provisioning included installing dependencies,
74+
// but now we have docker, so at least some of that job is part of deployment after all.
75+
7476

7577
((("staging sites", "manual server provisioning", id="SSserver09")))
7678
((("server provisioning", id="seerver09")))
@@ -209,18 +211,8 @@ https://www.whatsmydns.net/#A/staging.ottg.co.uk.
209211

210212
I'm planning to host my staging server at _staging.ottg.co.uk_
211213

212-
=== Installing ansible
213-
214-
TODO:
215-
216-
https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
217-
218-
suggests pipx. could also install it in the local virtualenv?
219-
may need to add docker-sdk
220214

221-
222-
223-
=== A first Cut of an Ansible Script
215+
=== Ansible
224216

225217
Infrastructure-as-code tools, also called "configuration management" tools,
226218
come in lots of shapes and sizes.
@@ -240,7 +232,27 @@ by expressing the desired state of the server in a particular config syntax,
240232
rather than specifying a procedural series of steps to be followed one by one.
241233

242234

243-
Let's dip our toes into ansible,
235+
==== Installing Ansible
236+
237+
Take a look at the instructions here:
238+
https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
239+
240+
----
241+
pipx install --include-deps ansible
242+
pipx inject ansible docker
243+
244+
# or
245+
246+
pip install ansible docker
247+
----
248+
249+
// TODO: consider introducing an explicit requirements.dev.txt here,
250+
// with -r requirements.txt and put ansible, docker, and selenium in there.
251+
252+
253+
==== A First Cut of an Ansible Playbook
254+
255+
Let's dip our toes into Ansible,
244256
and see if we can get it to run a simple "hello world" container on our server.
245257

246258
Here's what's called a "playbook" in ansible terminology.

0 commit comments

Comments
 (0)