After executing the yaml I am getting the attached error(screenshot). Can some tell me what is wrong with the following:
-
hosts: stapp01
gather_facts: false
become: true
tasks:- name: Create empty file
file:
path: /opt/devops/blog.txt
state: touch
owner: tony
group: tony - name: Create Symbolic link
file:
src: /opt/devops
dest: /var/www/html
state: link
- name: Create empty file
-
hosts: stapp02
gather_facts: false
become: true
tasks:- name: Create empty file
file:
path: /opt/devops/story.txt
state: touch
owner: steve
group: steve - name: Create Symbolic link
file:
src: /opt/devops
dest: /var/www/html
state: link
- name: Create empty file
-
hosts: stapp03
gather_facts: false
become: true
tasks:- name: Create empty file
file:
path: /opt/devops/media.txt
state: touch
owner: banner
group: banner - name: Create Symbolic link
file:
src: /opt/devops
dest: /var/www/html
state: link
- name: Create empty file