[Solved] How can i use variables in ansible playbook?


You can use variable in ansible playbook like:

- name: Create Directory
  file:
    path: "{{ directory_path }}"
    state: directory
    mode: 0755
  become: yes

In ansible you put the variable in double curly braces.
in the above example directory_path is a variable.
you can read about ansible variables here.

0

solved How can i use variables in ansible playbook?