16 lines
296 B
Markdown
16 lines
296 B
Markdown
## Variables
|
|
|
|
Define and use variables for flexibility:
|
|
|
|
```yaml
|
|
- name: Deploy application
|
|
hosts: all
|
|
vars:
|
|
app_version: "2.1.0"
|
|
app_port: 8080
|
|
tasks:
|
|
- name: Deploy app
|
|
get_url:
|
|
url: "https://example.com/app-{{ app_version }}.tar.gz"
|
|
dest: "/opt/app"
|
|
``` |