]> git.phdru.name Git - ansible.git/commitdiff
Feat(run-roles): Pass verbose output to a pager
authorOleg Broytman <phd@phdru.name>
Fri, 2 Jan 2026 15:22:08 +0000 (18:22 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 2 Jan 2026 15:22:08 +0000 (18:22 +0300)
playbooks/run-roles

index c752b9b1c2ef1976e476486153973c1a5a15e0e6..6adeb3ffe3b920088cd2fa503c40d8cb8a212a78 100755 (executable)
@@ -8,5 +8,10 @@ fi
 roles="$1"
 shift
 
+if which less >/dev/null 2>&1; then
+   LESS="S$LESS"
+fi
+
 cd "`dirname \"$0\"`" &&
-exec ansible-playbook run-roles.yaml "$@" -e roles="$roles"
+exec ansible-playbook run-roles.yaml "$@" -e roles="$roles" -v 2>&1 |
+    ${PAGER:-more}