Useful shortcuts for vi editor

Tuesday, 7 August 2018

usage of "run_once: true" option

If you want to run only once a specific task during all playbook execution, you may add "run_once: true" option into your task to do this.

e.g. example task
- name: prompt for directory name
  run_once: true
  pause:
   prompt: "Please enter directory name: "
  register: input_dir_name

- name: show input
  debug: 
   msg="{{ input_dir_name.user_input }}"