summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsirkubax <muszynski@so1.net>2017-10-20 23:45:03 +0200
committersirkubax <muszynski@so1.net>2017-10-20 23:45:03 +0200
commitceac9628c238b8835df8d7c0154c7a91d60ac74f (patch)
tree4c2ff4fc7ff7e036bfc906bcec33d2fda1e4729e
parent68eae69fb5471f645265216967044905f3471a29 (diff)
set -e - again
-rw-r--r--ansible.html.markdown46
1 files changed, 23 insertions, 23 deletions
diff --git a/ansible.html.markdown b/ansible.html.markdown
index 04862a14..bd0200f6 100644
--- a/ansible.html.markdown
+++ b/ansible.html.markdown
@@ -104,14 +104,14 @@ This example-playbook would execute (on all hosts defined in the inventory) two
* `shell` that execute three commands and return the output to our terminal
```yml
-hosts: all
-
-tasks:
- - name: "ping all"
- ping:
-
- - name: "execute a shell command"
- shell: "date; whoami; df -h;"
+- hosts: all
+
+ tasks:
+ - name: "ping all"
+ ping:
+
+ - name: "execute a shell command"
+ shell: "date; whoami; df -h;"
```
You can run the playbook with the command:
@@ -152,21 +152,21 @@ Role can be included in your playbook (executed via your playbook).
```yml
-hosts: all
-
-tasks:
- - name: "ping all"
- ping:
- - name: "execute a shell command"
- shell: "date; whoami; df -h;"
-
-role:
- - some_role
- - { role: another_role, some_variable: 'learnxiny', tags: ['my_tag'] }
-
-pre_tasks:
- - name: some pre-task
- shell: echo 'this task is the last, but would be executed before roles, and before tasks'
+- hosts: all
+
+ tasks:
+ - name: "ping all"
+ ping:
+ - name: "execute a shell command"
+ shell: "date; whoami; df -h;"
+
+ roles:
+ - some_role
+ - { role: another_role, some_variable: 'learnxiny', tags: ['my_tag'] }
+
+ pre_tasks:
+ - name: some pre-task
+ shell: echo 'this task is the last, but would be executed before roles, and before tasks'
```
#### For remaining examples we would use additional repository