Files
ansible/oldstuff/template-install.yaml
2023-08-17 23:08:37 +02:00

72 lines
1.7 KiB
YAML

---
- name: Slack
hosts: localhost
gather_facts: false
vars:
playbook_file: "{{ (lookup('file', '/proc/self/cmdline') | regex_replace('\u0000',' ')).split() | select('match','^.*[.]ya?ml$') | list | first }}"
tasks:
- name: Send notification message via Slack
community.general.slack:
token: "{{ slack_token }}"
msg: Starting {{ playbook_file }}
## BOInstall
- name: Install BOInstall
hosts: BOInstall
gather_facts: false
tasks:
- block:
- include: tasks/install-boinstall.yaml
rescue:
- include: tasks/task-failed-slack.yaml
## AxInstall
- name: Install AXInstall
hosts: AOS
gather_facts: false
tasks:
- block:
- include: tasks/install-axinstall.yaml
rescue:
- include: tasks/task-failed-slack.yaml
#- name: AXInstall Post-Installation tasks
# hosts: AOS_POM
# gather_facts: false
# tasks:
# - block:
# - include: tasks/install-axinstall-cilcompile.yaml
# rescue:
# - include: tasks/task-failed-slack.yaml
## Post-installs
#- name: Install PI46810 - CWS
# hosts: WEB_CWS
# gather_facts: false
# tasks:
# - block:
# - include: tasks/install-PI46810_CWS.yaml
# rescue:
# - include: tasks/task-failed-slack.yaml
#- name: Install PI46810 - BORIS
# hosts: WEB_BORIS
# gather_facts: false
# tasks:
# - block:
# - include: tasks/install-PI46810_BORIS.yaml
# rescue:
# - include: tasks/task-failed-slack.yaml
- name: Slack
hosts: localhost
gather_facts: false
tasks:
- name: Send notification message via Slack
community.general.slack:
token: "{{ slack_token }}"
msg: All done