Wednesday, 10 July 2019

Ansible playbook accessing variables from var file



---
- hosts: raghu
  vars_files:
      - firstplaybookvars.yml
  tasks:
      - name: Create file
        file:
            path: "{{ path }}"
            state: "{{ state }}"
        notify:
           - restart apache

  handlers:
      - name: restart apache
        service: name=httpd state=started

---
path: /tmp/raghu
state: touch

No comments:

Post a Comment

Git

1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...