Playbook
#
-
name: Execute command to display date on web_node1
hosts: web_node1
tasks:
-
name: Execute a date command
command: date
-
name: Execute a command to display hosts file contents on web_node2
hosts: web_node2
tasks:
-
name: Execute a command to display hosts file
command: cat /etc/hostsLast updated
Was this helpful?