Tuesday, July 18, 2017

Adding pre-tasks and post-tasks to playbooks



---
- hosts: www
  remote_user: vagrant
  sudo: yes
  pre_tasks:
     - shell: echo 'I":" Beginning to configure web server..'
  roles:
     - nginx
  post_tasks:
     - shell: echo 'I":" Done configuring nginx web server...'

No comments:

Post a Comment