Ansible Variables

From rbachwiki
Revision as of 21:25, 13 July 2022 by Bacchas (talk | contribs) (Created page with "=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")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Ansible Variables

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