How to create a folder using Ansible File Module and create a file named welcome
I have created 3 Ubuntu servers with the names:-
Server1 - Installed Ansible
Server2 - Client Node1
Server3- Client Node2
Note:- I installed ansible on Server1.
I have created a file :- vi create-file.yml
This will create the directory oracle on the / partition and welcome file under it
for app group [Server2 and Server3]
Now we will run the playbook with the command:- ansible-playbook create-file.yml
The above task has been completed successfully. We can validate the folder and file creation.
Server2
Server3
No comments:
Post a Comment