]> birchwood-abbey.net Git - Network.git/commitdiff
Use import_role rather than import_playbook.
authorMatt Birkholz <matt@birchwood-abbey.net>
Mon, 22 Dec 2025 16:30:36 +0000 (09:30 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Mon, 22 Dec 2025 16:30:36 +0000 (09:30 -0700)
The latter caused the current working directory to change, so the play
updated =Institute/private/vars.pl= instead of =private/vars.pl=.
Roles expect their CWD to be the same as the CWD of the play that
executed them (thus ~import_role~ does not frob the CWD?).

README.org
playbooks/check-inst-vars.yml

index e3eda9fc6289673372cf2f57fb861a2549c8259f..facceca875783b26b95540c8b1816f9f29b1f387 100644 (file)
@@ -2869,7 +2869,11 @@ code block "duplicates" the action of the institute's
 
 #+CAPTION: [[file:playbooks/check-inst-vars.yml][=playbooks/check-inst-vars.yml=]]
 #+BEGIN_SRC conf :tangle playbooks/check-inst-vars.yml
-- import_playbook: ../Institute/playbooks/check-inst-vars.yml
+- hosts: localhost
+  gather_facts: no
+  tasks:
+  - import_role:
+      name: check-inst-vars
 #+END_SRC
 
 ** The Upgrade Command
index f22b8875c65da78ab9ce6f8260012c3b77f33fdd..3cae5843d171d02f2c34f1f5b4d086074410fdb2 100644 (file)
@@ -1 +1,5 @@
-- import_playbook: ../Institute/playbooks/check-inst-vars.yml
+- hosts: localhost
+  gather_facts: no
+  tasks:
+  - import_role:
+      name: check-inst-vars