reverting b/c symbolic link doesn't work :-|
This commit is contained in:
30
playbooks/infrastructure/deploy_application.yml
Normal file
30
playbooks/infrastructure/deploy_application.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- name: application deployment
|
||||
hosts: web
|
||||
gather_facts: false
|
||||
become: true
|
||||
tasks:
|
||||
- name: make sure application is not empty
|
||||
assert:
|
||||
that:
|
||||
- "application != ''"
|
||||
|
||||
- name: printing to terminal application information
|
||||
debug:
|
||||
msg: "This Ansible Playbook will install {{application}}"
|
||||
|
||||
- name: install application
|
||||
dnf:
|
||||
name: "{{application}}"
|
||||
allow_downgrade: true
|
||||
register: result
|
||||
|
||||
- name: printing to terminal application information
|
||||
debug:
|
||||
msg: "The application: {{application}} has been installed"
|
||||
when: result.changed|bool
|
||||
|
||||
- name: printing to terminal application information
|
||||
debug:
|
||||
msg: "The application: {{application}} was already installed"
|
||||
when: not result.changed|bool
|
||||
Reference in New Issue
Block a user