syncing playbook change

This commit is contained in:
ipvsean
2020-05-16 16:57:57 -04:00
parent 0213b1924d
commit 74dc2f130a
2 changed files with 2 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
---
- 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}}"
use_backend: yum
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