Skip to content

Commit 4303b31

Browse files
author
lerndevops
authored
Create vars.yml
1 parent 45ee77b commit 4303b31

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ansible/playbooks/vars.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
- name: play1
2+
hosts: web
3+
vars:
4+
name: naresh
5+
abc: 45
6+
tasks:
7+
- debug: # is a module that will help you with print a message & also helps you to print the value of a variable just like echo in linux
8+
msg: "hi there"
9+
- debug:
10+
var: name
11+
- shell: sleep
12+
ignore_errors: yes
13+
- debug:
14+
msg: "the value of abc is: {{ abc }}"

0 commit comments

Comments
 (0)