Ansible Variables

From rbachwiki
Revision as of 21:26, 13 July 2022 by Bacchas (talk | contribs)
Jump to navigation Jump to search

Ansible Variables

 ---
 - name: setup apache ser er
  hosts: localhost
  vars:
    variablename: apache2
  tasks:
    apt:
      name: "{{ variablename }}"
      state: present
   tags: i-apache
 -name: start apache
 service:
   name: "{{ variablename }}"
   state: started
 tags: start_apache2