supercommit
This commit is contained in:
29
oldstuff/Clean_up.yaml
Normal file
29
oldstuff/Clean_up.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: Slack
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Send notification message via Slack
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting playbook Clean-up_Task.yaml
|
||||
|
||||
## Clean-up_Task
|
||||
- name: Clean-up_Task
|
||||
hosts: Note_install
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/Clean-up_Test.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
|
||||
29
oldstuff/Import-ax-modelstore.yaml
Normal file
29
oldstuff/Import-ax-modelstore.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: Slack
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Send notification message via Slack
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting playbook install-axinstall-importmodel.yaml
|
||||
|
||||
## install-axinstall-importmodel
|
||||
- name: install-axinstall-importmodel
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-importmodel.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
|
||||
45
oldstuff/ansible-krb-install.yaml
Normal file
45
oldstuff/ansible-krb-install.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
# playbooks/winrm_kerberos.yml
|
||||
# @version v1.00_2020-DEC-20
|
||||
# @author Kevin Jeffery
|
||||
|
||||
- name: Install WinRM Kerberos Dependencies
|
||||
hosts: localhost
|
||||
tasks:
|
||||
- name: Start
|
||||
debug:
|
||||
msg: "{{ ansible_date_time.date }} {{ ansible_date_time.time }}"
|
||||
|
||||
- name: Install Required Packages - RedHat/CentOS
|
||||
vars:
|
||||
ansible_python_interpreter: /usr/bin/python2
|
||||
yum:
|
||||
name:
|
||||
- gcc
|
||||
- python-devel
|
||||
- python3-devel
|
||||
- krb5-devel
|
||||
- krb5-libs
|
||||
- krb5-workstation
|
||||
state: latest
|
||||
update_cache: yes
|
||||
become: yes
|
||||
when: (ansible_os_family == "RedHat" or ansible_os_family == "CentOS") and ansible_distribution_version is version('8.0', 'lt')
|
||||
|
||||
- name: Install Required Packages - Debian/Ubuntu
|
||||
apt:
|
||||
name:
|
||||
- python-dev
|
||||
- python3-dev
|
||||
- libkrb5-dev
|
||||
- krb5-user
|
||||
state: latest
|
||||
update_cache: yes
|
||||
become: yes
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Install python winrm wrapper
|
||||
pip:
|
||||
name: "pywinrm[kerberos]"
|
||||
state: latest
|
||||
become: yes
|
||||
77
oldstuff/install-Bo_and_Ax.yaml
Normal file
77
oldstuff/install-Bo_and_Ax.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
- 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
|
||||
|
||||
|
||||
## Post-installs
|
||||
|
||||
# AXInstall example
|
||||
|
||||
#- 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
|
||||
|
||||
|
||||
# BOInstall example
|
||||
|
||||
#- name: Install PI46849_MDL
|
||||
# hosts: MDL
|
||||
# gather_facts: false
|
||||
# tasks:
|
||||
# - block:
|
||||
# - include: tasks/install-PI46849_MDL.yaml
|
||||
# rescue:
|
||||
# - include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
# PI46867_CWS_DBIFS_APP
|
||||
# - Skip because default BOInstall is BOInstall_120.81.2.0_120-81-2-0.exe
|
||||
|
||||
# PI46869_APP_API_BorisWeb
|
||||
# - Skip because default BOInstall is BOInstall_120.81.2.0_120-81-2-0.exe
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Slack
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Send notification message via Slack
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: All done
|
||||
97
oldstuff/install-axinstall-new.yaml
Normal file
97
oldstuff/install-axinstall-new.yaml
Normal file
@@ -0,0 +1,97 @@
|
||||
---
|
||||
- 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 }}
|
||||
|
||||
## AxInstall install-axinstall
|
||||
- name: Install AXInstall
|
||||
hosts: AOS
|
||||
gather_facts: false
|
||||
tags: [install_axinstall]
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-importmodel
|
||||
- name: install-axinstall-importmodel
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-importmodel.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-xppcompileall
|
||||
- name: Install install-axinstall-xppcompileall
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-xppcompileall.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-cilcompile
|
||||
- name: Install install-axinstall-cilcompile
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-cilcompile.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-deployposttravelcardservices
|
||||
- name: install-axinstall-deployposttravelcardservices
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-deployposttravelcardservices.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-TravelCardDeployTravelCardServices
|
||||
- name: install-axinstall-TravelCardDeployTravelCardServices
|
||||
hosts: AOS
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-TravelCardDeployTravelCardServices.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-sqlreindex.yaml
|
||||
- name: install-axinstall-sqlreindex.yaml
|
||||
hosts: SQL
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-sqlreindex.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: AX install all done
|
||||
30
oldstuff/install-boinstall.yaml
Normal file
30
oldstuff/install-boinstall.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- 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
|
||||
|
||||
- name: Slack
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Send notification message via Slack
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: All done
|
||||
108
oldstuff/install-boinstall_and_axinstall-new.yaml
Normal file
108
oldstuff/install-boinstall_and_axinstall-new.yaml
Normal file
@@ -0,0 +1,108 @@
|
||||
---
|
||||
- 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 install-axinstall
|
||||
- name: Install AXInstall
|
||||
hosts: AOS
|
||||
gather_facts: false
|
||||
tags: [install_axinstall]
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-importmodel
|
||||
- name: install-axinstall-importmodel
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-importmodel.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-xppcompileall
|
||||
- name: Install install-axinstall-xppcompileall
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-xppcompileall.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-cilcompile
|
||||
- name: Install install-axinstall-cilcompile
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-cilcompile.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-deployposttravelcardservices
|
||||
- name: install-axinstall-deployposttravelcardservices
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-deployposttravelcardservices.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-TravelCardDeployTravelCardServices
|
||||
- name: install-axinstall-TravelCardDeployTravelCardServices
|
||||
hosts: AOS
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-TravelCardDeployTravelCardServices.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall install-axinstall-sqlreindex.yaml
|
||||
- name: install-axinstall-sqlreindex.yaml
|
||||
hosts: SQL
|
||||
gather_facts: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-sqlreindex.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: AX install all done
|
||||
77
oldstuff/install-boinstall_and_axinstall.yaml
Normal file
77
oldstuff/install-boinstall_and_axinstall.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
- 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
|
||||
|
||||
|
||||
## Post-installs
|
||||
|
||||
# AXInstall example
|
||||
|
||||
#- 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
|
||||
|
||||
|
||||
# BOInstall example
|
||||
|
||||
#- name: Install PI46849_MDL
|
||||
# hosts: MDL
|
||||
# gather_facts: false
|
||||
# tasks:
|
||||
# - block:
|
||||
# - include: tasks/install-PI46849_MDL.yaml
|
||||
# rescue:
|
||||
# - include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
# PI46867_CWS_DBIFS_APP
|
||||
# - Skip because default BOInstall is BOInstall_120.81.2.0_120-81-2-0.exe
|
||||
|
||||
# PI46869_APP_API_BorisWeb
|
||||
# - Skip because default BOInstall is BOInstall_120.81.2.0_120-81-2-0.exe
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Slack
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Send notification message via Slack
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: All done
|
||||
29
oldstuff/install-notepadplus.yaml
Normal file
29
oldstuff/install-notepadplus.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: Slack
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Send notification message via Slack
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting playbook install_note.yaml
|
||||
|
||||
## install note
|
||||
- name: install_note
|
||||
hosts: Note_install
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-notepadplus.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
|
||||
29
oldstuff/old/OLD_run-ax-Cilcompile.yaml
Normal file
29
oldstuff/old/OLD_run-ax-Cilcompile.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: Slack
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Send notification message via Slack
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting playbook install-axinstall-cilcompile.yaml
|
||||
|
||||
## install-axinstall-cilcompile
|
||||
- name: install-axinstall-cilcompile
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/install-axinstall-cilcompile.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
|
||||
77
oldstuff/old/install-v12.0.yaml
Normal file
77
oldstuff/old/install-v12.0.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
- 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
|
||||
|
||||
|
||||
## Post-installs
|
||||
|
||||
# AXInstall example
|
||||
|
||||
#- 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
|
||||
|
||||
|
||||
# BOInstall example
|
||||
|
||||
#- name: Install PI46849_MDL
|
||||
# hosts: MDL
|
||||
# gather_facts: false
|
||||
# tasks:
|
||||
# - block:
|
||||
# - include: tasks/install-PI46849_MDL.yaml
|
||||
# rescue:
|
||||
# - include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
# PI46867_CWS_DBIFS_APP
|
||||
# - Skip because default BOInstall is BOInstall_120.81.2.0_120-81-2-0.exe
|
||||
|
||||
# PI46869_APP_API_BorisWeb
|
||||
# - Skip because default BOInstall is BOInstall_120.81.2.0_120-81-2-0.exe
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Slack
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Send notification message via Slack
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: All done
|
||||
29
oldstuff/start-AX.yaml
Normal file
29
oldstuff/start-AX.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- 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 }}
|
||||
|
||||
- name: Start AOS
|
||||
hosts: AOS
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/start-aos.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
|
||||
84
oldstuff/start.yaml
Normal file
84
oldstuff/start.yaml
Normal file
@@ -0,0 +1,84 @@
|
||||
---
|
||||
- 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 }}
|
||||
|
||||
|
||||
- name: Start AOS
|
||||
hosts: AOS
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/start-aos.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
|
||||
- name: Start BCM_CLUSTER
|
||||
hosts: BCM_CLUSTER
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/start-ifsbo.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
|
||||
- name: Start APP
|
||||
hosts: APP
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/start-iis.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
- name: Start DPS, FAS, MDL, SPS, TCS
|
||||
hosts: DPS, FAS, MDL, SPS, TCS
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/start-ifsbo.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
- name: Start WEB, API
|
||||
hosts: WEB, API
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/start-iis.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
#- name: Start Nagios
|
||||
# hosts: SMC
|
||||
# tasks:
|
||||
# - name: podman start nagios
|
||||
# command: podman start nagios
|
||||
|
||||
# - name: podman start n2a
|
||||
# command: podman start n2a
|
||||
|
||||
|
||||
|
||||
- name: Slack
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Send notification message via Slack
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: All done
|
||||
30
oldstuff/stop-AX.yaml
Normal file
30
oldstuff/stop-AX.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- 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 }}
|
||||
|
||||
- name: Stop AOS
|
||||
hosts: AOS
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/stop-aos.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
|
||||
81
oldstuff/stop.yaml
Normal file
81
oldstuff/stop.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
- 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 }}
|
||||
|
||||
#- name: Stop N2A
|
||||
# hosts: SMC
|
||||
# tasks:
|
||||
# - name: podman stop n2a
|
||||
# command: podman stop n2a
|
||||
|
||||
# - name: podman stop nagios
|
||||
# command: podman stop nagios
|
||||
|
||||
- name: Stop WEB, API
|
||||
hosts: WEB, API
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/stop-iis.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
- name: Stop DPS, FAS, MDL, SPS, TCS
|
||||
hosts: DPS, FAS, MDL, SPS, TCS
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/stop-ifsbo.yaml
|
||||
- include: tasks/reboot.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
- name: Stop APP
|
||||
hosts: APP
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/stop-iis.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
- name: Stop BCM_CLUSTER
|
||||
hosts: BCM_CLUSTER
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/stop-ifsbo.yaml
|
||||
- include: tasks/reboot.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
- name: Stop AOS
|
||||
hosts: AOS
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/stop-aos.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
|
||||
21
oldstuff/tasks/Clean-up_Test.yaml
Normal file
21
oldstuff/tasks/Clean-up_Test.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Running Clean-up on {{ inventory_hostname }}
|
||||
|
||||
- name: Running Clean-up Scripts
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
#Script to Clean-up
|
||||
|
||||
#Creating Directory
|
||||
New-Item -Path 'D:\software\Archive' -ItemType Directory
|
||||
|
||||
$Users = 'ThalesAdmin','Installserveruser'
|
||||
|
||||
#Moving files to path (ThalesAdmin,Installserveruser)
|
||||
foreach ($user in $Users) {
|
||||
Get-ChildItem -Exclude *.lnk -Path "C:\Users\$user\Desktop\" -Recurse | Move-Item -Verbose -Force -Destination "D:\software\Archive"
|
||||
}
|
||||
18
oldstuff/tasks/Postinstalls/install-PI43972_CWS.yaml
Normal file
18
oldstuff/tasks/Postinstalls/install-PI43972_CWS.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI43972 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy _BaseLayout.cshtml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43972_CWS/_BaseLayout.cshtml
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\Views\Shared\
|
||||
backup: yes
|
||||
|
||||
- name: Copy Renew.cshtml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43972_CWS/Renew.cshtml
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\Views\SeasonPass\
|
||||
backup: yes
|
||||
18
oldstuff/tasks/Postinstalls/install-PI43976_CWS.yaml
Normal file
18
oldstuff/tasks/Postinstalls/install-PI43976_CWS.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI43976 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy ui-icons_444444_256x240.png
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43976_CWSWEB/ui-icons_444444_256x240.png
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\App_Themes\CWS\images\
|
||||
backup: yes
|
||||
|
||||
- name: Copy ui-icons_555555_256x240.png
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43976_CWSWEB/ui-icons_555555_256x240.png
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\App_Themes\CWS\images\
|
||||
backup: yes
|
||||
12
oldstuff/tasks/Postinstalls/install-PI43980_CWS.yaml
Normal file
12
oldstuff/tasks/Postinstalls/install-PI43980_CWS.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI43980 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy CWSDictionary.xml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43980_DBIFS_CWSWEB/CWSDictionary.xml
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\App_Data\CWSDictionary.xml
|
||||
backup: yes
|
||||
12
oldstuff/tasks/Postinstalls/install-PI43981_CWS.yaml
Normal file
12
oldstuff/tasks/Postinstalls/install-PI43981_CWS.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI43981 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy CWS.dll
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43981_CWSWEB/CWS.dll
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\bin\
|
||||
backup: yes
|
||||
12
oldstuff/tasks/Postinstalls/install-PI46769_CWS.yaml
Normal file
12
oldstuff/tasks/Postinstalls/install-PI46769_CWS.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46769 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy CWS.dll
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46769_CWSWEB/CWS.dll
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\bin\
|
||||
backup: yes
|
||||
12
oldstuff/tasks/Postinstalls/install-PI46777_CWS.yaml
Normal file
12
oldstuff/tasks/Postinstalls/install-PI46777_CWS.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46777 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy MyInformation.cshtml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46777_CWSWEB/MyInformation.cshtml
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\Views\CustomerManagement\MyInformation.cshtml
|
||||
backup: yes
|
||||
21
oldstuff/tasks/Postinstalls/install-PI46792_MDL.yaml
Normal file
21
oldstuff/tasks/Postinstalls/install-PI46792_MDL.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46792 (MDL) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy DCP_CMNDeEncoder_P.dll
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46792_MDL/DCP_CMNDeEncoder_P.dll
|
||||
dest: D:\IFSBOSystem\bin\DCP_CMNDeEncoder_P.dll
|
||||
backup: yes
|
||||
|
||||
- name: Copy Register_DCP_CMNDeEncoder_P_FileProcessor.bat
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46792_MDL/Register_DCP_CMNDeEncoder_P_FileProcessor.bat
|
||||
dest: D:\IFSBOSystem\bin\Register_DCP_CMNDeEncoder_P_FileProcessor.bat
|
||||
backup: yes
|
||||
|
||||
- name: Register dll
|
||||
win_command: D:\IFSBOSystem\bin\Register_DCP_CMNDeEncoder_P_FileProcessor.bat
|
||||
11
oldstuff/tasks/Postinstalls/install-PI46810_BORIS.yaml
Normal file
11
oldstuff/tasks/Postinstalls/install-PI46810_BORIS.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46810 (BORIS) on {{ inventory_hostname }}
|
||||
- name: Copy BorisDictionary.xml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46810_DBIFS_CWSWEB_BORISWEB/BorisDictionary.xml
|
||||
dest: D:\IFSBOSystem\WebSite\Boris\App_Data\BorisDictionary.xml
|
||||
backup: yes
|
||||
11
oldstuff/tasks/Postinstalls/install-PI46810_CWS.yaml
Normal file
11
oldstuff/tasks/Postinstalls/install-PI46810_CWS.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46810 (CWS) on {{ inventory_hostname }}
|
||||
- name: Copy CWSDictionary.xml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46810_DBIFS_CWSWEB_BORISWEB/CWSDictionary.xml
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\App_Data\CWSDictionary.xml
|
||||
backup: yes
|
||||
50
oldstuff/tasks/Postinstalls/install-PI46838.yaml
Normal file
50
oldstuff/tasks/Postinstalls/install-PI46838.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Start Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: started
|
||||
start_mode: auto
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting Xpo import PI46838 {{ inventory_hostname }}
|
||||
|
||||
- name: Run Ax32.exe CIL compile
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c 'D:\Program Files (x86)\Microsoft Dynamics AX\60\Client\bin\Ax32.exe' -aotImportFile=D:\software\PI46838_AXPOM_REP\PI46838.xpo"
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting CIL compile on {{ inventory_hostname }}
|
||||
|
||||
- name: Run Ax32.exe CIL compile
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c 'D:\Program Files (x86)\Microsoft Dynamics AX\60\Client\bin\Ax32.exe' -startupcmd=CompileIL"
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Stopping Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Stop Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: stopped
|
||||
start_mode: auto
|
||||
19
oldstuff/tasks/Postinstalls/install-PI46849_MDL.yaml
Normal file
19
oldstuff/tasks/Postinstalls/install-PI46849_MDL.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46849_MDL on {{ inventory_hostname }}
|
||||
|
||||
|
||||
- name: Stop Housekeeping Agent
|
||||
ansible.windows.win_service:
|
||||
name: IFSHouseKeepingAgent
|
||||
state: stopped
|
||||
|
||||
|
||||
- name: Copy IFS.HouseKeeping.Agent.exe
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46849_MDL/IFS.HouseKeeping.Agent.exe
|
||||
dest: D:\IFSBOSystem\bin\IFS.HouseKeeping.Agent.exe
|
||||
backup: yes
|
||||
18
oldstuff/tasks/Postinstalls/v.12/install-PI43972_CWS.yaml
Normal file
18
oldstuff/tasks/Postinstalls/v.12/install-PI43972_CWS.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI43972 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy _BaseLayout.cshtml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43972_CWS/_BaseLayout.cshtml
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\Views\Shared\
|
||||
backup: yes
|
||||
|
||||
- name: Copy Renew.cshtml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43972_CWS/Renew.cshtml
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\Views\SeasonPass\
|
||||
backup: yes
|
||||
18
oldstuff/tasks/Postinstalls/v.12/install-PI43976_CWS.yaml
Normal file
18
oldstuff/tasks/Postinstalls/v.12/install-PI43976_CWS.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI43976 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy ui-icons_444444_256x240.png
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43976_CWSWEB/ui-icons_444444_256x240.png
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\App_Themes\CWS\images\
|
||||
backup: yes
|
||||
|
||||
- name: Copy ui-icons_555555_256x240.png
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43976_CWSWEB/ui-icons_555555_256x240.png
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\App_Themes\CWS\images\
|
||||
backup: yes
|
||||
12
oldstuff/tasks/Postinstalls/v.12/install-PI43980_CWS.yaml
Normal file
12
oldstuff/tasks/Postinstalls/v.12/install-PI43980_CWS.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI43980 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy CWSDictionary.xml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43980_DBIFS_CWSWEB/CWSDictionary.xml
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\App_Data\CWSDictionary.xml
|
||||
backup: yes
|
||||
12
oldstuff/tasks/Postinstalls/v.12/install-PI43981_CWS.yaml
Normal file
12
oldstuff/tasks/Postinstalls/v.12/install-PI43981_CWS.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI43981 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy CWS.dll
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI43981_CWSWEB/CWS.dll
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\bin\
|
||||
backup: yes
|
||||
12
oldstuff/tasks/Postinstalls/v.12/install-PI46769_CWS.yaml
Normal file
12
oldstuff/tasks/Postinstalls/v.12/install-PI46769_CWS.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46769 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy CWS.dll
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46769_CWSWEB/CWS.dll
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\bin\
|
||||
backup: yes
|
||||
12
oldstuff/tasks/Postinstalls/v.12/install-PI46777_CWS.yaml
Normal file
12
oldstuff/tasks/Postinstalls/v.12/install-PI46777_CWS.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46777 (CWS) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy MyInformation.cshtml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46777_CWSWEB/MyInformation.cshtml
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\Views\CustomerManagement\MyInformation.cshtml
|
||||
backup: yes
|
||||
21
oldstuff/tasks/Postinstalls/v.12/install-PI46792_MDL.yaml
Normal file
21
oldstuff/tasks/Postinstalls/v.12/install-PI46792_MDL.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46792 (MDL) on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy DCP_CMNDeEncoder_P.dll
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46792_MDL/DCP_CMNDeEncoder_P.dll
|
||||
dest: D:\IFSBOSystem\bin\DCP_CMNDeEncoder_P.dll
|
||||
backup: yes
|
||||
|
||||
- name: Copy Register_DCP_CMNDeEncoder_P_FileProcessor.bat
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46792_MDL/Register_DCP_CMNDeEncoder_P_FileProcessor.bat
|
||||
dest: D:\IFSBOSystem\bin\Register_DCP_CMNDeEncoder_P_FileProcessor.bat
|
||||
backup: yes
|
||||
|
||||
- name: Register dll
|
||||
win_command: D:\IFSBOSystem\bin\Register_DCP_CMNDeEncoder_P_FileProcessor.bat
|
||||
11
oldstuff/tasks/Postinstalls/v.12/install-PI46810_BORIS.yaml
Normal file
11
oldstuff/tasks/Postinstalls/v.12/install-PI46810_BORIS.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46810 (BORIS) on {{ inventory_hostname }}
|
||||
- name: Copy BorisDictionary.xml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46810_DBIFS_CWSWEB_BORISWEB/BorisDictionary.xml
|
||||
dest: D:\IFSBOSystem\WebSite\Boris\App_Data\BorisDictionary.xml
|
||||
backup: yes
|
||||
11
oldstuff/tasks/Postinstalls/v.12/install-PI46810_CWS.yaml
Normal file
11
oldstuff/tasks/Postinstalls/v.12/install-PI46810_CWS.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46810 (CWS) on {{ inventory_hostname }}
|
||||
- name: Copy CWSDictionary.xml
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46810_DBIFS_CWSWEB_BORISWEB/CWSDictionary.xml
|
||||
dest: D:\IFSBOSystem\WebSite\CWS\App_Data\CWSDictionary.xml
|
||||
backup: yes
|
||||
50
oldstuff/tasks/Postinstalls/v.12/install-PI46838.yaml
Normal file
50
oldstuff/tasks/Postinstalls/v.12/install-PI46838.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Start Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: started
|
||||
start_mode: auto
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting Xpo import PI46838 {{ inventory_hostname }}
|
||||
|
||||
- name: Run Ax32.exe CIL compile
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c 'D:\Program Files (x86)\Microsoft Dynamics AX\60\Client\bin\Ax32.exe' -aotImportFile=D:\software\PI46838_AXPOM_REP\PI46838.xpo"
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting CIL compile on {{ inventory_hostname }}
|
||||
|
||||
- name: Run Ax32.exe CIL compile
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c 'D:\Program Files (x86)\Microsoft Dynamics AX\60\Client\bin\Ax32.exe' -startupcmd=CompileIL"
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Stopping Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Stop Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: stopped
|
||||
start_mode: auto
|
||||
19
oldstuff/tasks/Postinstalls/v.12/install-PI46849_MDL.yaml
Normal file
19
oldstuff/tasks/Postinstalls/v.12/install-PI46849_MDL.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing PI46849_MDL on {{ inventory_hostname }}
|
||||
|
||||
|
||||
- name: Stop Housekeeping Agent
|
||||
ansible.windows.win_service:
|
||||
name: IFSHouseKeepingAgent
|
||||
state: stopped
|
||||
|
||||
|
||||
- name: Copy IFS.HouseKeeping.Agent.exe
|
||||
win_copy:
|
||||
src: ~/ansible/install/PostInstalls/PI46849_MDL/IFS.HouseKeeping.Agent.exe
|
||||
dest: D:\IFSBOSystem\bin\IFS.HouseKeeping.Agent.exe
|
||||
backup: yes
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying AXInstall files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\AXInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy {{AXInstall}}
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{AXInstall}}
|
||||
dest: D:\AXInstall\{{AXInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/v12.0/rejtesta.local/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\AXInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting AXInstall on {{ inventory_hostname }}
|
||||
|
||||
- name: Run {{AXInstall}}
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\AXInstall\{{AXInstall}} /PlatFormFilesPath=D:\AXInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process AXInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSAXSystem\InstallLog\AXInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Cleaning up AXInstall files on {{ inventory_hostname }}
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\AXInstall
|
||||
state: absent
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying AXInstall files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\AXInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy {{AXInstall}}
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{AXInstall}}
|
||||
dest: D:\AXInstall\{{AXInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/v12.0/rejtestc.local/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\AXInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting AXInstall on {{ inventory_hostname }}
|
||||
|
||||
- name: Run {{AXInstall}}
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\AXInstall\{{AXInstall}} /PlatFormFilesPath=D:\AXInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process AXInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSAXSystem\InstallLog\AXInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Cleaning up AXInstall files on {{ inventory_hostname }}
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\AXInstall
|
||||
state: absent
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying BOInstall files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy BOInstall
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{BOInstall}}
|
||||
dest: D:\BOInstall\{{BOInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/v12.0/rejtesta.local/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\BOInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting BOInstall on {{ inventory_hostname }}
|
||||
|
||||
- name: Run BOInstall
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\BOInstall\{{BOInstall}} /PlatFormFilesPath=D:\BOInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process BOInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSBOSystem\InstallLog\BOInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Running fixlog4net on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy fixlog4net
|
||||
win_copy:
|
||||
src: ~/ansible/install/fixlog4net.ps1
|
||||
dest: D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
- name: Run fixlog4net
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: absent
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying BOInstall files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy BOInstall
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{BOInstall}}
|
||||
dest: D:\BOInstall\{{BOInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/v12.0/rejtestc.local/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\BOInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting BOInstall on {{ inventory_hostname }}
|
||||
|
||||
- name: Run BOInstall
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\BOInstall\{{BOInstall}} /PlatFormFilesPath=D:\BOInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process BOInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSBOSystem\InstallLog\BOInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Running fixlog4net on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy fixlog4net
|
||||
win_copy:
|
||||
src: ~/ansible/install/fixlog4net.ps1
|
||||
dest: D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
- name: Run fixlog4net
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: absent
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying BOInstall files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy BOInstall
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{BOInstall}}
|
||||
dest: D:\BOInstall\{{BOInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/v12.0/rejtesta.local/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\BOInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting BOInstall on {{ inventory_hostname }}
|
||||
|
||||
- name: Run BOInstall
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\BOInstall\{{BOInstall}} /PlatFormFilesPath=D:\BOInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process BOInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSBOSystem\InstallLog\BOInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Running fixlog4net on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy fixlog4net
|
||||
win_copy:
|
||||
src: ~/ansible/install/fixlog4net.ps1
|
||||
dest: D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
- name: Run fixlog4net
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: absent
|
||||
19
oldstuff/tasks/grab-config.yaml
Normal file
19
oldstuff/tasks/grab-config.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Grabbing config from {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\BackUp_Config
|
||||
state: directory
|
||||
|
||||
- name: Copy grab_config.cmd
|
||||
win_copy:
|
||||
src: ~/ansible/install/grab_config.cmd
|
||||
dest: D:\BackUp_Config\grab_config.cmd
|
||||
|
||||
- name: Run grab_config
|
||||
win_command: D:\BackUp_Config\grab_config.cmd {{epoch}}
|
||||
@@ -0,0 +1,36 @@
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Deploying TravelCard Services on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy TravelCardDeployTravelCardServices script
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{AOS_Deploy_TravelService}}
|
||||
dest: D:\software\TravelCardDeployTravelCardServices.cmd
|
||||
|
||||
- name: Run TravelCardDeployTravelCardServices script
|
||||
win_command: cmd.exe /c "cd /d D:\software && call TravelCardDeployTravelCardServices.cmd"
|
||||
register: script_result
|
||||
changed_when: false
|
||||
failed_when: "'Execution of TravelCardDeployTravelCardServices done' not in script_result.stdout"
|
||||
|
||||
- name: Send notification message via Slack
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: "Deployed TravelCard Services on {{ inventory_hostname }} : {{ 'Success' if script_result else 'Failed' }}"
|
||||
when: script_result is defined
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: stopping AX on {{ inventory_hostname }}
|
||||
|
||||
- name: Start Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: stopped
|
||||
start_mode: auto
|
||||
|
||||
|
||||
112
oldstuff/tasks/install-axinstall-cilcompile.yaml
Normal file
112
oldstuff/tasks/install-axinstall-cilcompile.yaml
Normal file
@@ -0,0 +1,112 @@
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Start Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: started
|
||||
start_mode: auto
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting CIL compile on {{ inventory_hostname }}
|
||||
|
||||
|
||||
#- name: Compile CIL using Invoke-AxaptaServerCmd
|
||||
# ansible.windows.win_shell: |
|
||||
# $null = . 'D:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities\Microsoft.Dynamics.ManagementUtilities.ps1'
|
||||
# $AOSInstanceName = (Get-WmiObject -Class "MicrosoftDynamicsAX|InstalledAOSInstances" -Namespace "root\MicrosoftDynamicsAX").InstanceName
|
||||
# $output = Invoke-AxaptaServerCmd -Server $AOSInstanceName -Command "CompileIL"
|
||||
# register: cil_compile_output
|
||||
# tags:
|
||||
# - ax_compile_cil
|
||||
|
||||
- name: Compile CIL using AX32.exe
|
||||
win_shell: |
|
||||
$startupCmd = "-startupcmd=CompileIL"
|
||||
$createDesktopA = @"
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern IntPtr CreateDesktopA(string lpszDesktop, IntPtr lpszDevice, IntPtr pDevmode, uint dwFlags, uint dwDesiredAccess, IntPtr lpsa);
|
||||
"@
|
||||
Add-Type -MemberDefinition $createDesktopA -Name "NativeMethods" -Namespace "Win32"
|
||||
$desktop = [Win32.NativeMethods]::CreateDesktopA("CustomDesktop", [IntPtr]::Zero, [IntPtr]::Zero, 0, 0x10000000, [IntPtr]::Zero)
|
||||
$job = Start-Job -ScriptBlock {Start-Process -FilePath "ax32.exe" -ArgumentList "-startupcmd=CompileIL" -Wait}
|
||||
Wait-Job $job
|
||||
register: cil_compile_output
|
||||
tags:
|
||||
- ax_compile_cil
|
||||
|
||||
- name: Check CIL compilation result
|
||||
win_shell: |
|
||||
$logFilePath = "D:\Program Files\Microsoft Dynamics AX\60\Server\TravelCardDynamicsAX\bin\XppIL\Dynamics.Ax.Application.dll.log"
|
||||
if (Test-Path $logFilePath) {
|
||||
$logContent = Get-Content $logFilePath -Raw -Encoding UTF8
|
||||
$errors = Select-String -Path $logFilePath -Pattern "Error"
|
||||
$warnings = Select-String -Path $logFilePath -Pattern "Warning"
|
||||
if ($logContent -match "Finished creating types.") {
|
||||
Write-Output "CIL compilation succeeded."
|
||||
Write-Host "Number of Errors: $($errors.Line)"
|
||||
Write-Host "Number of Warnings: $($warnings.Line)"
|
||||
} else {Write-Output "CIL compilation failed."
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Output "Log file not found."
|
||||
}
|
||||
register: cil_compile_output
|
||||
tags:
|
||||
- ax_compile_cil
|
||||
|
||||
|
||||
- name: Send CIL compilation result notification via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: |
|
||||
CIL compilation result for {{ inventory_hostname }}:
|
||||
{{ cil_compile_output.stdout_lines}}
|
||||
tags:
|
||||
- ax_compile_cil
|
||||
|
||||
|
||||
|
||||
|
||||
#- name: Show CIL compilation result
|
||||
# ansible.builtin.debug:
|
||||
# var: cil_compile_output.stdout_lines
|
||||
# tags:
|
||||
# - ax_compile_cil
|
||||
#
|
||||
#- name: Send CIL compilation result notification via Slack
|
||||
# delegate_to: localhost
|
||||
# community.general.slack:
|
||||
# token: "{{ slack_token }}"
|
||||
# msg: |
|
||||
# CIL compilation result for {{ inventory_hostname }}:
|
||||
# {% if cil_compile_output.stdout_lines %}
|
||||
# {% for line in cil_compile_output.stdout_lines %}
|
||||
# {{ line }}
|
||||
# {% endfor %}
|
||||
# {% else %}
|
||||
# No output received.
|
||||
# {% endif %}
|
||||
# tags:
|
||||
# - ax_compile_cil
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Stopping Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Stop Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: stopped
|
||||
start_mode: auto
|
||||
@@ -0,0 +1,62 @@
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Deploying TravelCard Services on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy TravelCardPostDeploy script
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{AOS_Deploy_PostTravel_Test}}
|
||||
dest: D:\software\TravelCardPostDeploy.cmd
|
||||
|
||||
- name: Run TravelCardPostDeploy script
|
||||
win_command: cmd.exe /c "cd /d D:\software && call TravelCardPostDeploy.cmd"
|
||||
register: script_result
|
||||
changed_when: false
|
||||
failed_when: "'Execution of TravelCardPostDeploy done' not in script_result.stdout"
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: "Deployed TravelCard Services on {{ inventory_hostname }} : {{ 'Success' if script_result else 'Failed' }}"
|
||||
when: script_result is defined and script_result.stdout is defined
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: restaring AX on {{ inventory_hostname }}
|
||||
|
||||
- name: Start Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: restarted
|
||||
start_mode: manual
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: starting AX on {{ inventory_hostname }}
|
||||
|
||||
- name: Start Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: started
|
||||
start_mode: manual
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: stopping AX on {{ inventory_hostname }}
|
||||
|
||||
- name: Start Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: stopped
|
||||
start_mode: auto
|
||||
|
||||
|
||||
95
oldstuff/tasks/install-axinstall-importmodel.yaml
Normal file
95
oldstuff/tasks/install-axinstall-importmodel.yaml
Normal file
@@ -0,0 +1,95 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Start Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: started
|
||||
start_mode: manual
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting Model import {{ inventory_hostname }}
|
||||
|
||||
- name: Import TravelCardDynamicsAX.axmodel
|
||||
ansible.windows.win_shell: |
|
||||
$null = . 'D:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities\Microsoft.Dynamics.ManagementUtilities.ps1'
|
||||
$capture = axutil import /file:D:\IFSAXSystem\Tools\Model\TravelCardDynamicsAX.axmodel /noprompt /conflict:overwrite
|
||||
$capture -match "was successfully imported"
|
||||
become: true
|
||||
register: import_output
|
||||
tags:
|
||||
- ax_import
|
||||
|
||||
- name: Display import_output
|
||||
debug:
|
||||
var: import_output.stdout
|
||||
tags:
|
||||
- ax_import
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: "Model import done on {{ inventory_hostname }}: {{ import_output.stdout }}"
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: setting no install mode on {{ inventory_hostname }}
|
||||
|
||||
- name: Run Dynamics.ManagementUtilities.ps1 - no install mode
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$null = . 'D:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities\Microsoft.Dynamics.ManagementUtilities.ps1'
|
||||
$capture = axutil set /noInstallMode
|
||||
$capture -match "successfully applied"
|
||||
register: output
|
||||
failed_when: "'The NoInstallMode has been successfully applied.' not in output.output"
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: "no install mode set on {{ inventory_hostname }} : {{output.output}}"
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: get travelCard Version on {{ inventory_hostname }}
|
||||
|
||||
- name: Get TravelCard version
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$output = & 'D:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities\Microsoft.Dynamics.ManagementUtilities.ps1' | axutil list
|
||||
$travelCardLine = ($output -split "`n" | Select-String -Pattern "TravelCard ").Line
|
||||
$travelCardLineClean = $travelCardLine -replace '.*?(?=TravelCard)', ''
|
||||
Write-Output $travelCardLineClean
|
||||
register: travel_card_version
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: "TravelCard Version on {{ inventory_hostname }}: {{ travel_card_version.output }}"
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Stopping Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Stop Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: stopped
|
||||
start_mode: manual
|
||||
26
oldstuff/tasks/install-axinstall-sqlreindex.yaml
Normal file
26
oldstuff/tasks/install-axinstall-sqlreindex.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Running XU_Reindex and XU_ResetHandleIdentity on {{ inventory_hostname }}
|
||||
|
||||
- name: Execute SQL commands on the TravelCardDynamicsAX database
|
||||
ansible.windows.win_shell: |
|
||||
Import-Module SqlServer
|
||||
$server = "{{ inventory_hostname }}"
|
||||
$database = "TravelCardDynamicsAX"
|
||||
$query1 = "exec XU_Reindex"
|
||||
$query2 = "exec XU_ResetHandleIdentity"
|
||||
|
||||
Invoke-Sqlcmd -ServerInstance $server -Database $database -Query $query1
|
||||
Invoke-Sqlcmd -ServerInstance $server -Database $database -Query $query2
|
||||
register: sql_result
|
||||
tags:
|
||||
- sql_commands
|
||||
delegate_to: "{{ groups['SQL'][0] }}"
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Done running XU_Reindex and XU_ResetHandleIdentity on {{ inventory_hostname }}
|
||||
103
oldstuff/tasks/install-axinstall-xppcompileall.yaml
Normal file
103
oldstuff/tasks/install-axinstall-xppcompileall.yaml
Normal file
@@ -0,0 +1,103 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Start Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: started
|
||||
start_mode: manual
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Synchronize database {{ inventory_hostname }}
|
||||
|
||||
- name: Execute ax32.exe with –startupcmd=synchronize_dbonly using CreateDesktopA function
|
||||
win_shell: |
|
||||
$startupCmd = "-startupcmd=synchronize_dbonly"
|
||||
$createDesktopA = @"
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern IntPtr CreateDesktopA(string lpszDesktop, IntPtr lpszDevice, IntPtr pDevmode, uint dwFlags, uint dwDesiredAccess, IntPtr lpsa);
|
||||
"@
|
||||
Add-Type -MemberDefinition $createDesktopA -Name "NativeMethods" -Namespace "Win32"
|
||||
$desktop = [Win32.NativeMethods]::CreateDesktopA("CustomDesktop", [IntPtr]::Zero, [IntPtr]::Zero, 0, 0x10000000, [IntPtr]::Zero)
|
||||
Start-Process -FilePath "ax32.exe" -ArgumentList $startupCmd -Wait
|
||||
register: result
|
||||
|
||||
- name: Verify synchronization
|
||||
win_shell: Get-EventLog -LogName Application -Source "Dynamics Server 01" -After (Get-Date).Date | Where-Object {$_.Source -eq "Dynamics Server 01" -and $_.Message -like "*Sync finished*"}
|
||||
register: event_log_result
|
||||
|
||||
- name: Show verification result
|
||||
debug:
|
||||
var: event_log_result.stdout_lines
|
||||
|
||||
- name: Send DB sync status via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: "{% if event_log_result.stdout_lines %}:white_check_mark: Database synchronization on {{ inventory_hostname }} completed successfully.{% else %}:x: Database synchronization on {{ inventory_hostname }} failed with exit code {{ event_log_result.rc }}.{% endif %}"
|
||||
|
||||
- name: Send xpp_compile start message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: "Starting xppcompileall on {{ inventory_hostname }}"
|
||||
|
||||
|
||||
- name: xppcompileall AX
|
||||
ansible.windows.win_shell: |
|
||||
$binPath = "D:\Program Files\Microsoft Dynamics AX\60\Server\TravelCardDynamicsAX\bin"
|
||||
$axBuildPath = "$binPath\AXBuild.exe"
|
||||
Set-Location -Path $binPath
|
||||
& $axBuildPath xppcompileall /s=01 /v
|
||||
$logFilePath = "D:\Program Files\Microsoft Dynamics AX\60\Server\TravelCardDynamicsAX\Log\AxCompileAll.html"
|
||||
$logContent = Get-Content -Path $logFilePath -Raw
|
||||
$errorCount = [regex]::Match($logContent, '<H2>Errors\s+:\s+(\d+)</H2>').Groups[1].Value
|
||||
$warningCount = [regex]::Match($logContent, '<H2>Warnings\s+:\s+(\d+)</H2>').Groups[1].Value
|
||||
if ($errorCount -gt 0) {
|
||||
$status = "failed with $errorCount error(s)."
|
||||
$color = "danger"
|
||||
} else {
|
||||
$status = "completed with $warningCount warning(s)."
|
||||
if ($warningCount -gt 0) {
|
||||
$color = "warning"
|
||||
} else {
|
||||
$color = "good"
|
||||
}
|
||||
}
|
||||
become: true
|
||||
register: xppcompile_result
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: |
|
||||
{{
|
||||
"Compilation completed successfully." if xppcompile_result.rc == 0
|
||||
else "Compilation failed with " + xppcompile_result.stdout.split(':')[1].strip() + " error(s)."
|
||||
}}
|
||||
{{
|
||||
"Warnings: " + xppcompile_result.stdout.split(':')[3].strip() + "." if "Warnings:" in xppcompile_result.stdout else ""
|
||||
}}
|
||||
when: xppcompile_result is defined
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Stopping Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Stop Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: stopped
|
||||
start_mode: manual
|
||||
81
oldstuff/tasks/install-axinstall.yaml
Normal file
81
oldstuff/tasks/install-axinstall.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying AXInstall files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\AXInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy {{AXInstall}}
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{AXInstall}}
|
||||
dest: D:\AXInstall\{{AXInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/{{ configVersion }}/{{ configName }}/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\AXInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting {{AXInstall}} on {{ inventory_hostname }}
|
||||
|
||||
- name: Run {{AXInstall}}
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\AXInstall\{{AXInstall}} /PlatFormFilesPath=D:\AXInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process AXInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSAXSystem\InstallLog\AXInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Cleaning up AXInstall files on {{ inventory_hostname }}
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\AXInstall
|
||||
state: absent
|
||||
88
oldstuff/tasks/install-boinstall.yaml
Normal file
88
oldstuff/tasks/install-boinstall.yaml
Normal file
@@ -0,0 +1,88 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying {{BOInstall}} to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy BOInstall
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{BOInstall}}
|
||||
dest: D:\BOInstall\{{BOInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/{{ configVersion }}/{{ configName }}/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\BOInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Installing {{BOInstall}} on {{ inventory_hostname }}
|
||||
|
||||
- name: Run {{BOInstall}}
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\BOInstall\{{BOInstall}} /PlatFormFilesPath=D:\BOInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process BOInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSBOSystem\InstallLog\BOInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
#- name: Send notification message via Slack
|
||||
# delegate_to: localhost
|
||||
# community.general.slack:
|
||||
# token: "{{ slack_token }}"
|
||||
# msg: Running fixlog4net on {{ inventory_hostname }}
|
||||
|
||||
#- name: Copy fixlog4net
|
||||
# win_copy:
|
||||
# src: ~/ansible/install/fixlog4net.ps1
|
||||
# dest: D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
#- name: Run fixlog4net
|
||||
# ansible.windows.win_powershell:
|
||||
# script: |
|
||||
# D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: absent
|
||||
53
oldstuff/tasks/install-notepadplus.yaml
Normal file
53
oldstuff/tasks/install-notepadplus.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying Note_install files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\software\
|
||||
state: directory
|
||||
|
||||
- name: Copy {{Note_install}}
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{Note_install}}
|
||||
dest: D:\software\{{Note_install}}
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting Note_install on {{ inventory_hostname }}
|
||||
|
||||
- name: Run {{Note_install}}
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
D:\Sofware\{{Note_install}} /S
|
||||
Get-Process npp* | Wait-Process
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking Version installed on {{ inventory_hostname }}
|
||||
|
||||
- name: Version Check
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$log = Get-Item 'C:\Program Files\Notepad++\change.log'
|
||||
$topline = $log | Get-Content | Select -First 1
|
||||
|
||||
if($result.Matches[0].Groups[1].Value -match 'Notepad\+\+ v8.4.1') {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
###name: Clean up
|
||||
### ansible.windows.win_file:
|
||||
### path: D:\software\{{Note_install}}
|
||||
### state: absent
|
||||
81
oldstuff/tasks/old/install-axinstall-v12.0-TestA.yaml
Normal file
81
oldstuff/tasks/old/install-axinstall-v12.0-TestA.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying AXInstall files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\AXInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy {{AXInstall}}
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{AXInstall}}
|
||||
dest: D:\AXInstall\{{AXInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/v12.0/rejtesta.local/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\AXInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting AXInstall on {{ inventory_hostname }}
|
||||
|
||||
- name: Run {{AXInstall}}
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\AXInstall\{{AXInstall}} /PlatFormFilesPath=D:\AXInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process AXInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSAXSystem\InstallLog\AXInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Cleaning up AXInstall files on {{ inventory_hostname }}
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\AXInstall
|
||||
state: absent
|
||||
81
oldstuff/tasks/old/install-axinstall-v12.0-TestC.yaml
Normal file
81
oldstuff/tasks/old/install-axinstall-v12.0-TestC.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying AXInstall files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\AXInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy {{AXInstall}}
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{AXInstall}}
|
||||
dest: D:\AXInstall\{{AXInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/v12.0/rejtestc.local/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\AXInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting AXInstall on {{ inventory_hostname }}
|
||||
|
||||
- name: Run {{AXInstall}}
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\AXInstall\{{AXInstall}} /PlatFormFilesPath=D:\AXInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process AXInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSAXSystem\InstallLog\AXInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Cleaning up AXInstall files on {{ inventory_hostname }}
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\AXInstall
|
||||
state: absent
|
||||
89
oldstuff/tasks/old/install-boinstall-v12.0-TestA.yaml
Normal file
89
oldstuff/tasks/old/install-boinstall-v12.0-TestA.yaml
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying BOInstall files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy BOInstall
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{BOInstall}}
|
||||
dest: D:\BOInstall\{{BOInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/v12.0/rejtesta.local/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\BOInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting BOInstall on {{ inventory_hostname }}
|
||||
|
||||
- name: Run BOInstall
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\BOInstall\{{BOInstall}} /PlatFormFilesPath=D:\BOInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process BOInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSBOSystem\InstallLog\BOInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Running fixlog4net on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy fixlog4net
|
||||
win_copy:
|
||||
src: ~/ansible/install/fixlog4net.ps1
|
||||
dest: D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
- name: Run fixlog4net
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: absent
|
||||
89
oldstuff/tasks/old/install-boinstall-v12.0-TestC.yaml
Normal file
89
oldstuff/tasks/old/install-boinstall-v12.0-TestC.yaml
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying BOInstall files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy BOInstall
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{BOInstall}}
|
||||
dest: D:\BOInstall\{{BOInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/v12.0/rejtestc.local/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\BOInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting BOInstall on {{ inventory_hostname }}
|
||||
|
||||
- name: Run BOInstall
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\BOInstall\{{BOInstall}} /PlatFormFilesPath=D:\BOInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process BOInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSBOSystem\InstallLog\BOInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Running fixlog4net on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy fixlog4net
|
||||
win_copy:
|
||||
src: ~/ansible/install/fixlog4net.ps1
|
||||
dest: D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
- name: Run fixlog4net
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: absent
|
||||
89
oldstuff/tasks/old/install-boinstall-v12.0_HF.yaml
Normal file
89
oldstuff/tasks/old/install-boinstall-v12.0_HF.yaml
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Copying BOInstall files to {{ inventory_hostname }}
|
||||
|
||||
- name: Prepare install target
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: directory
|
||||
|
||||
- name: Copy BOInstall
|
||||
win_copy:
|
||||
src: ~/ansible/install/{{BOInstall}}
|
||||
dest: D:\BOInstall\{{BOInstall}}
|
||||
|
||||
- name: Copy Config
|
||||
win_copy:
|
||||
src: ~/ansible/install/config/v12.0/rejtesta.local/{{ inventory_hostname.split('.')[0]|upper }}/
|
||||
dest: D:\BOInstall\Config
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting BOInstall on {{ inventory_hostname }}
|
||||
|
||||
- name: Run BOInstall
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
iex "cmd /c D:\BOInstall\{{BOInstall}} /PlatFormFilesPath=D:\BOInstall\Config /ForceReboot=False /S"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process BOInstall | Wait-Process
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Checking final errorstatus 0 on {{ inventory_hostname }}
|
||||
|
||||
- name: Final errorstatus
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$newestLog = Get-Item D:\IFSBOSystem\InstallLog\BOInstall_*.log | Sort LastWriteTime -Descending | Select-Object -First 1
|
||||
$result = $newestLog | Select-String -Pattern 'The final errorstatus is ([0-9]+)'
|
||||
if($result.Matches[0].Groups[1].Value -ne 0) {
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Running fixlog4net on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy fixlog4net
|
||||
win_copy:
|
||||
src: ~/ansible/install/fixlog4net.ps1
|
||||
dest: D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
- name: Run fixlog4net
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
- name: Clean up
|
||||
ansible.windows.win_file:
|
||||
path: D:\BOInstall
|
||||
state: absent
|
||||
9
oldstuff/tasks/reboot.yaml
Normal file
9
oldstuff/tasks/reboot.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
12
oldstuff/tasks/start-aos.yaml
Normal file
12
oldstuff/tasks/start-aos.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Starting Dynamics Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: started
|
||||
start_mode: auto
|
||||
32
oldstuff/tasks/start-ifsbo.yaml
Normal file
32
oldstuff/tasks/start-ifsbo.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting IFSBO on {{ inventory_hostname }}
|
||||
|
||||
- name: IFSBO-Start
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
# start agent service
|
||||
Get-Service -DisplayName 'IFS HouseKeeping Agent' | Start-Service
|
||||
# connect to agent
|
||||
$proxy = New-WebServiceProxy -Uri 'http://localhost:9080/HouseKeepingAgentService/'
|
||||
$proxy.Startup()
|
||||
# start retry loop
|
||||
:retry for($retry = 0; $retry -lt 60; $retry++) {
|
||||
Start-Sleep -Seconds 5
|
||||
# get component status
|
||||
$components = $proxy.ComponentsInfo()
|
||||
# if any component is not running, restart retry loop
|
||||
foreach($component in $components) {
|
||||
if($component.Status -eq 'Error') {
|
||||
throw "Component $($component.Name) has failed to start"
|
||||
}
|
||||
if($component.Status -ne 'Running') {
|
||||
continue retry
|
||||
}
|
||||
}
|
||||
# break retry loop
|
||||
break retry
|
||||
}
|
||||
9
oldstuff/tasks/start-iis.yaml
Normal file
9
oldstuff/tasks/start-iis.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Starting IIS on {{ inventory_hostname }}
|
||||
|
||||
- name: iisreset -start
|
||||
win_command: iisreset -start
|
||||
12
oldstuff/tasks/stop-aos.yaml
Normal file
12
oldstuff/tasks/stop-aos.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Stopping Ax service on {{ inventory_hostname }}
|
||||
|
||||
- name: Stop Dynamics Ax service
|
||||
ansible.windows.win_service:
|
||||
name: "aos60$01"
|
||||
state: stopped
|
||||
start_mode: manual
|
||||
37
oldstuff/tasks/stop-ifsbo.yaml
Normal file
37
oldstuff/tasks/stop-ifsbo.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Stopping IFSBO on {{ inventory_hostname }}
|
||||
|
||||
- name: IFSBO-Stop
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$forceQuit = $false
|
||||
# ensure agent is running
|
||||
Get-Service -DisplayName 'IFS HouseKeeping Agent' | Start-Service -ErrorAction Stop
|
||||
# connect to agent
|
||||
$proxy = New-WebServiceProxy -Uri 'http://localhost:9080/HouseKeepingAgentService/'
|
||||
# initiate shutdown
|
||||
$proxy.Shutdown($forceQuit, $true)
|
||||
# Start retry loop
|
||||
:retry for($retry = 0; $retry -lt 60; $retry++) {
|
||||
|
||||
Start-Sleep -Seconds 5
|
||||
# if any component is still running, restart retry loop
|
||||
foreach($component in $components) {
|
||||
if($component.Status -eq 'Running') {
|
||||
continue retry
|
||||
}
|
||||
}
|
||||
# no components running
|
||||
if($retry -eq 59) {
|
||||
$forceQuit = $true
|
||||
}
|
||||
# break retry loop
|
||||
break retry
|
||||
}
|
||||
# Shutdown agent
|
||||
$proxy.ShutdownAndQuit($forceQuit, $true)
|
||||
|
||||
9
oldstuff/tasks/stop-iis.yaml
Normal file
9
oldstuff/tasks/stop-iis.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Stopping IIS on {{ inventory_hostname }}
|
||||
|
||||
- name: iisreset -stop
|
||||
win_command: iisreset -stop
|
||||
9
oldstuff/tasks/task-failed-slack.yaml
Normal file
9
oldstuff/tasks/task-failed-slack.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Task failed on {{ inventory_hostname }}
|
||||
|
||||
- name: Fail
|
||||
ansible.builtin.command: /bin/false
|
||||
16
oldstuff/tasks/test-log4net.yaml
Normal file
16
oldstuff/tasks/test-log4net.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Running fixlog4net on {{ inventory_hostname }}
|
||||
|
||||
- name: Copy fixlog4net
|
||||
win_copy:
|
||||
src: ~/ansible/install/fixlog4net.ps1
|
||||
dest: D:\BOInstall\fixlog4net.ps1
|
||||
|
||||
- name: Run fixlog4net
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
D:\BOInstall\fixlog4net.ps1
|
||||
11
oldstuff/tasks/uninstall-axinstall-pom.yaml
Normal file
11
oldstuff/tasks/uninstall-axinstall-pom.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Deleting contents of XppiL folder
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$path = 'D:\Program Files\Microsoft Dynamics AX\60\Server\TravelCardDynamicsAX\bin\XppIL'
|
||||
Get-Item -Path "$path\*" | Remove-Item -Force -Recurse
|
||||
$items = Get-ChildItem -Recurse -Path $path
|
||||
if($items.Count -gt 0) {
|
||||
$Ansible.Result = "Items remaining in XppiL: $($items.Count)"
|
||||
$Ansible.Failed = $true
|
||||
}
|
||||
23
oldstuff/tasks/uninstall-axinstall.yaml
Normal file
23
oldstuff/tasks/uninstall-axinstall.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
- name: Uninstall AXInstall
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$lastInstall = (Get-ItemProperty -Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\AXInstall\ -Name LastInstall).LastInstall
|
||||
$uninstallString = (Get-ItemProperty -Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$lastInstall\ -Name UninstallString).UninstallString
|
||||
iex "cmd /c '$uninstallString' /S /ForceReboot=False"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process Au_ | Wait-Process
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
- name: Cleanup IFSAXSystem folder
|
||||
win_file:
|
||||
path: D:\IFSAXSystem
|
||||
state: absent
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: uninstall Done on {{ inventory_hostname }}
|
||||
39
oldstuff/tasks/uninstall-boinstall.yaml
Normal file
39
oldstuff/tasks/uninstall-boinstall.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Uninstalling BOInstall on {{ inventory_hostname }}
|
||||
|
||||
- name: Uninstall BOInstall
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$lastInstall = (Get-ItemProperty -Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\BOInstall\ -Name LastInstall).LastInstall
|
||||
$uninstallString = (Get-ItemProperty -Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$lastinstall\ -Name UninstallString).UninstallString
|
||||
iex "cmd /c '$uninstallString' /S /ForceReboot=False"
|
||||
Start-Sleep -Seconds 30
|
||||
Get-Process Au_ | Wait-Process
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Rebooting {{ inventory_hostname }}
|
||||
|
||||
- name: Reboot
|
||||
win_reboot:
|
||||
|
||||
|
||||
- name: Send notification message via Slack
|
||||
delegate_to: localhost
|
||||
community.general.slack:
|
||||
token: "{{ slack_token }}"
|
||||
msg: Cleanup IFSBOSystem on {{ inventory_hostname }}
|
||||
|
||||
|
||||
- name: Cleanup IFSBOSystem folder
|
||||
win_file:
|
||||
path: D:\IFSBOSystem
|
||||
state: absent
|
||||
|
||||
71
oldstuff/template-install.yaml
Normal file
71
oldstuff/template-install.yaml
Normal file
@@ -0,0 +1,71 @@
|
||||
---
|
||||
- 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
|
||||
15
oldstuff/test-connectivity.yaml
Normal file
15
oldstuff/test-connectivity.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: test winrm connexion
|
||||
hosts: Windows
|
||||
vars:
|
||||
# ansible_user: svcansible@DOMAIN.EAST-WEST.DK
|
||||
# ansible_password: 4bUmP3ZgOE70WDmuMuS8WD3ZgOmuMuS8
|
||||
# ansible_connection: winrm
|
||||
# ansible_winrm_server_cert_validation: ignore
|
||||
# ansible_winrm_scheme: http
|
||||
# ansible_ssh_port: 5985
|
||||
# ansible_winrm_transport: kerberos
|
||||
# ansible_winrm_kinit_mode: auto
|
||||
# ansible_winrm_kinit_cmd: 'echo "4bUmP3ZgOE70WDmuMuS8WD3ZgOmuMuS8" | kinit svcansible@DOMAIN.EAST-WEST.DK'
|
||||
tasks:
|
||||
- win_ping:
|
||||
34
oldstuff/test-grabconfig.yaml
Normal file
34
oldstuff/test-grabconfig.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
- 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 }}
|
||||
- name: Get epoch timestamp
|
||||
shell: date +%s
|
||||
register: timestamp
|
||||
|
||||
- name: Grab config - all servers
|
||||
hosts: ServersWithConfigs
|
||||
gather_facts: false
|
||||
vars:
|
||||
epoch: "{{ hostvars['localhost']['timestamp'].stdout }}"
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/grab-config.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
|
||||
10
oldstuff/test-log4net.yaml
Normal file
10
oldstuff/test-log4net.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: Install BOInstall
|
||||
hosts: SQL
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/test-log4net.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
16
oldstuff/test-windows.yaml
Normal file
16
oldstuff/test-windows.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: testing windows hosts
|
||||
hosts: Windows
|
||||
tasks:
|
||||
- name: run ipconfig
|
||||
raw: ipconfig
|
||||
register: ipconfig
|
||||
|
||||
- debug: var=ipconfig
|
||||
|
||||
- name: run ping
|
||||
ansible.windows.win_ping:
|
||||
register: winping
|
||||
|
||||
- debug: var=winping
|
||||
|
||||
45
oldstuff/uninstall-axinstall.yaml
Normal file
45
oldstuff/uninstall-axinstall.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
- 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 }}
|
||||
- name: Get epoch timestamp
|
||||
shell: date +%s
|
||||
register: timestamp
|
||||
|
||||
- name: Grab config - all servers
|
||||
hosts: AOS
|
||||
gather_facts: false
|
||||
vars:
|
||||
epoch: "{{ hostvars['localhost']['timestamp'].stdout }}"
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/grab-config.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
## AxInstall
|
||||
- name: Uninstall AXInstall
|
||||
hosts: AOS
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/uninstall-axinstall.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
- name: Uninstall AXInstall - XppiL cleanup
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/uninstall-axinstall-pom.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
37
oldstuff/uninstall-boinstall.yaml
Normal file
37
oldstuff/uninstall-boinstall.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
- 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 }}
|
||||
- name: Get epoch timestamp
|
||||
shell: date +%s
|
||||
register: timestamp
|
||||
|
||||
- name: Grab config - all servers
|
||||
hosts: BOInstall
|
||||
gather_facts: false
|
||||
vars:
|
||||
epoch: "{{ hostvars['localhost']['timestamp'].stdout }}"
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/grab-config.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
## BOInstall
|
||||
- name: Uninstall BOInstall
|
||||
hosts: BOInstall
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/uninstall-boinstall.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
55
oldstuff/uninstall.yaml
Normal file
55
oldstuff/uninstall.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
- 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 }}
|
||||
- name: Get epoch timestamp
|
||||
shell: date +%s
|
||||
register: timestamp
|
||||
|
||||
- name: Grab config - all servers
|
||||
hosts: ServersWithConfigs
|
||||
gather_facts: false
|
||||
vars:
|
||||
epoch: "{{ hostvars['localhost']['timestamp'].stdout }}"
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/grab-config.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
|
||||
## BOInstall
|
||||
- name: Uninstall BOInstall
|
||||
hosts: BOInstall
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/uninstall-boinstall.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
## AxInstall
|
||||
- name: Uninstall AXInstall
|
||||
hosts: AOS
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/uninstall-axinstall.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
|
||||
- name: Uninstall AXInstall - XppiL cleanup
|
||||
hosts: AOS_POM
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- include: tasks/uninstall-axinstall-pom.yaml
|
||||
rescue:
|
||||
- include: tasks/task-failed-slack.yaml
|
||||
Reference in New Issue
Block a user