From 782f8df6e41f29dce2db4970a3ad84aaeb7d8c5f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 14 May 2024 22:04:50 +0200 Subject: Adding upstream version 4.3.7. Signed-off-by: Daniel Baumann --- examples/example.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 examples/example.yml (limited to 'examples/example.yml') diff --git a/examples/example.yml b/examples/example.yml new file mode 100644 index 0000000..1ce910d --- /dev/null +++ b/examples/example.yml @@ -0,0 +1,52 @@ +--- +- hosts: webservers + + vars: + oldskool: "1.2.3" + bracket: "and close bracket" + + tasks: + - name: unset variable + action: command echo {{thisvariable}} is not set in this playbook + + - name: trailing whitespace + action: command echo do nothing + + - name: git check + action: git a=b c=d + + - name: git check 2 + action: git version=HEAD c=d + + - name: git check 3 + git: version=a1b2c3d4 repo=xyz bobbins=d + + - name: executing git through command + action: command git clone blah + + - name: executing git through command + action: command chdir=bobbins creates=whatever /usr/bin/git clone blah + + - name: using git module + action: git repo=blah + + - name: passing git as an argument to another task + action: debug msg="{{item}}" + with_items: + - git + - bobbins + + - name: yum latest + yum: state=latest name=httpd + + - debug: msg="task without a name" + + - name: apt latest + apt: state=latest name=apache2 + + - name: always run + debug: msg="always_run is deprecated" + always_run: true + + # empty task is currently accepted by ansible as valid code: + - -- cgit v1.2.3