From 2fe34b6444502079dc0b84365ce82dbc92de308e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:06:49 +0200 Subject: Adding upstream version 6.17.2. Signed-off-by: Daniel Baumann --- examples/playbooks/example.yml | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 examples/playbooks/example.yml (limited to 'examples/playbooks/example.yml') diff --git a/examples/playbooks/example.yml b/examples/playbooks/example.yml new file mode 100644 index 0000000..fa1a635 --- /dev/null +++ b/examples/playbooks/example.yml @@ -0,0 +1,49 @@ +--- +- name: Fixture for test_example + hosts: webservers + vars: + old_school: 1.2.3 + bracket: and close bracket + + tasks: + - name: Unset variable + action: ansible.builtin.command echo {{this_variable}} is not set in this playbook + + - name: Trailing whitespace + action: ansible.builtin.command echo do nothing + + - name: Run git check + action: ansible.builtin.git a=b c=d + + - name: Run git check 2 + action: ansible.builtin.git version=HEAD c=d + + - name: Run git check 3 + ansible.builtin.git: version=a1b2c3d4 repo=xyz bobbins=d + + - name: Executing git through command + action: ansible.builtin.command git clone blah + + - name: Executing git through command + action: ansible.builtin.command chdir=bobbins creates=whatever /usr/bin/git clone blah + + - name: Using git module + action: ansible.builtin.git repo=blah + + - name: Passing git as an argument to another task + action: ansible.builtin.debug msg="{{item}}" + with_items: + - git # yamllint wrong indentation + - bobbins + + - name: Yum latest + ansible.builtin.yum: state=latest name=httpd + + - ansible.builtin.debug: msg="debug task without a name" + + - name: Run apt latest + ansible.builtin.apt: state=latest name=apache2 + + - ansible.builtin.meta: flush_handlers + # empty task is currently accepted by ansible as valid code but not our schemas: + - -- cgit v1.2.3