File: example.yml

package info (click to toggle)
ansible-lint 4.1.0%2Bdfsg.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,096 kB
  • sloc: python: 3,373; sh: 4; makefile: 2
file content (49 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download
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
---
- 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