blob: fa1a635226f986cdaca8762a36ee6422c2df1b79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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:
-
|