cleanup
This commit is contained in:
31
linux/deploy_application.yml
Normal file
31
linux/deploy_application.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
- name: application deployment
|
||||
hosts: "{{ HOSTS }}"
|
||||
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
|
||||
@@ -389,3 +389,28 @@ controller_templates:
|
||||
- "Yes"
|
||||
- "No"
|
||||
default: "No"
|
||||
|
||||
- name: "LINUX / Deploy Application"
|
||||
job_type: run
|
||||
inventory: "Workshop Inventory"
|
||||
project: "Ansible official demo project"
|
||||
playbook: "linux/deploy_application.yml"
|
||||
notification_templates_started: Telemetry
|
||||
notification_templates_success: Telemetry
|
||||
notification_templates_error: Telemetry
|
||||
use_fact_cache: true
|
||||
credentials:
|
||||
- "Workshop Credential"
|
||||
survey_enabled: true
|
||||
survey:
|
||||
name: ''
|
||||
description: ''
|
||||
spec:
|
||||
- question_name: Server Name or Pattern
|
||||
type: text
|
||||
variable: HOSTS
|
||||
required: true
|
||||
- question_name: Application Package Name
|
||||
type: text
|
||||
variable: application
|
||||
required: true
|
||||
|
||||
Reference in New Issue
Block a user