@@ -358,11 +358,12 @@ https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.h
358
358
359
359
[subs="specialcharacters,quotes"]
360
360
----
361
- $ *ansible-playbook --user=elspeth -i staging.ottg.co.uk, infra/ansible-provision.yaml -vv*
361
+ $ *ansible-playbook --user=elspeth -i staging.ottg.co.uk, infra/ansible-provision.yaml -K - vv*
362
362
ansible-playbook [core 2.16.3]
363
363
config file = None
364
364
[...]
365
365
No config file found; using defaults
366
+ BECOME password:
366
367
Skipping callback 'default', as we already have a stdout callback.
367
368
Skipping callback 'minimal', as we already have a stdout callback.
368
369
Skipping callback 'oneline', as we already have a stdout callback.
@@ -405,6 +406,9 @@ skipped=0 rescued=0 ignored=0
405
406
// group, this requires a password for `sudo` on the server. I would add
406
407
// a TIP or something similar to inform the reader it can be done with the `-K` flag:
407
408
// ansible-playbook --user=elspeth -i staging.ottg.co.uk, infra/ansible-provision.yaml -K -vv
409
+ //
410
+ // Even with the server's user added to `docker`, if there is a task where
411
+ // `become: true` is set, we need to provide the password with the `-K`
408
412
409
413
I don't know about you, but whenever I make a terminal spew out a stream
410
414
of output, I like to make little _brrp brrp brrp_ noises, a bit like the
@@ -552,7 +556,7 @@ In Ansible config, it looks like this:
552
556
553
557
[subs="specialcharacters,quotes"]
554
558
----
555
- $ *ansible-playbook --user=elspeth -i staging.ottg.co.uk, infra/ansible-provision.yaml -vv*
559
+ $ *ansible-playbook --user=elspeth -i staging.ottg.co.uk, infra/ansible-provision.yaml -K - vv*
556
560
[...]
557
561
558
562
PLAYBOOK: ansible-provision.yaml **********************************************
0 commit comments