Skip to content

Commit

Permalink
Add ES plays
Browse files Browse the repository at this point in the history
  • Loading branch information
UNiXMIT committed Jan 23, 2024
1 parent 869b40a commit 2e49afb
Show file tree
Hide file tree
Showing 8 changed files with 372 additions and 5 deletions.
2 changes: 1 addition & 1 deletion win/ed70.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

- name: ED 7.0 PU 22
set_fact:
installerNameEDVSPU: edvs2019_70_pu22_337406
installerNameEDVSPU: edvs2019_70_pu22_337406.exe
installerNameEDEPU: ede_70_pu22_337404.exe
productName: ED70PU22
tags: ed70pu22
8 changes: 4 additions & 4 deletions win/ed80.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@

- name: ED 8.0 PU 11
set_fact:
installerNameEDVSPU: ede_80_pu11_331770.exe
installerNameEDEPU: edvs2022_80_pu11_331774.exe
installerNameEDVSPU: edvs2022_80_pu11_331774.exe
installerNameEDEPU: ede_80_pu11_331770.exe
productName: ED80PU11
tags: ed80pu11

- name: ED 8.0 PU 12
set_fact:
installerNameEDVSPU: ede_80_pu12_336862.exe
installerNameEDEPU: edvs2022_80_pu12_336866.exe
installerNameEDVSPU: edvs2022_80_pu12_336866.exe
installerNameEDEPU: ede_80_pu12_336862.exe
productName: ED80PU12
tags: ed80pu12

Expand Down
205 changes: 205 additions & 0 deletions win/es.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
- name: Download ES
block:
- name: Get {{ installerNameES }} Download URL from S3
amazon.aws.s3_object:
profile: '{{ awsProfile }}'
bucket: mturner
mode: geturl
object: '{{ S3Prefix }}{{ installerNameES }}'
region: '{{ awsRegion }}'
expiry: 4000
sig_v4: true
register: s3es
delegate_to: localhost

- name: Get SafeNet License Download URL from S3
amazon.aws.s3_object:
profile: '{{ awsProfile }}'
bucket: mturner
mode: geturl
object: ED/Licenses/lservrc.net
region: '{{ awsRegion }}'
expiry: 4000
sig_v4: true
register: s3sn
delegate_to: localhost

- name: Get AutoPass License Download URL from S3
amazon.aws.s3_object:
profile: '{{ awsProfile }}'
bucket: mturner
mode: geturl
object: ED/Licenses/LicFile.txt
region: '{{ awsRegion }}'
expiry: 4000
sig_v4: true
register: s3ap
delegate_to: localhost

- name: Download {{ installerNameES }}
ansible.windows.win_get_url:
url: '{{ s3es.url }}'
dest: C:\temp\

- name: Download SafeNet License
ansible.windows.win_get_url:
url: '{{ s3sn.url }}'
dest: C:\temp\

- name: Download AutoPass License
ansible.windows.win_get_url:
url: '{{ s3ap.url }}'
dest: C:\temp\
tags: es

- name: Download ES PU
block:
- name: Get {{ installerNameESPU }} Download URL from S3
amazon.aws.s3_object:
profile: '{{ awsProfile }}'
bucket: mturner
mode: geturl
object: '{{ S3Prefix }}{{ installerNameESPU }}'
region: '{{ awsRegion }}'
expiry: 4000
sig_v4: true
register: s3espu
delegate_to: localhost

- name: Download {{ installerNameESPU }}
ansible.windows.win_get_url:
url: '{{ s3espu.url }}'
dest: C:\temp\
tags: espu

- name: Add ES Tags
amazon.aws.ec2_tag:
aws_profile: '{{ awsProfile }}'
region: '{{ awsRegion }}'
resource: '{{ item }}'
tags:
Name: '{{ semaphore_vars.task_details.username|upper }}-{{ imageName }} {{ productName }}'
ES: '{{ installerNameES }}'
state: present
loop: "{{ hostvars['localhost'].ec2.instance_ids }}"
delegate_to: localhost
tags: es

- name: Add ES PU Tags
amazon.aws.ec2_tag:
aws_profile: '{{ awsProfile }}'
region: '{{ awsRegion }}'
resource: '{{ item }}'
tags:
ESPU: '{{ installerNameESPU }}'
state: present
loop: "{{ hostvars['localhost'].ec2.instance_ids }}"
delegate_to: localhost
tags: espu

- name: Install ES
block:
- name: Install {{ installerNameES }}
win_package:
path: C:\temp\{{ installerNameES }}
state: present
arguments: /passive /log C:\temp\{{ installerNameES }}.log /norestart
tags: es

- name: Install ES PU
block:
- name: Install {{ installerNameESPU }}
win_package:
path: C:\temp\{{ installerNameESPU }}
state: present
arguments: /passive /log C:\temp\{{ installerNameESPU }}.log /norestart
tags: espu

# - name: Add License Server
# win_lineinfile:
# path: C:\ProgramData\Micro Focus\ces.ini
# regex: '^lshost'
# line: 'lshost = {{ licenseServer }}'
# tags: es

# - name: Install Safenet License File
# win_get_url:
# url: '{{ SafenetFile }}'
# dest: C:\ProgramData\Micro Focus\lservrc.net
# tags: es

- name: Install Safenet License File
ansible.windows.win_copy:
src: C:\temp\lservrc.net
dest: C:\ProgramData\Micro Focus\lservrc.net
remote_src: true
tags: es

# - name: Install AutoPass License File
# win_get_url:
# url: '{{ AutoPassFile }}'
# dest: C:\ProgramData\Micro Focus\LicFile.txt
# tags: es

- name: Install AutoPass License File
ansible.windows.win_copy:
src: C:\temp\LicFile.txt
dest: C:\ProgramData\Micro Focus\LicFile.txt
remote_src: true
tags: es

- name: Import JCL Region
win_command:
cmd: '"C:\Program Files (x86)\Micro Focus\Enterprise Server\bin\mfds.exe" -g 5 C:\MFSamples\JCL\JCL.xml'
chdir: C:\MFSamples\JCL
tags: es

- name: Stop MFDS Service
ansible.windows.win_service:
name: mf_CCITCP2
state: stopped
tags: es

- name: Enable ESMAC UI
win_command:
cmd: '"C:\Program Files (x86)\Micro Focus\Enterprise Server\bin\mfds.exe" --UI-on'
ignore_errors: yes
tags: es

- name: Enable ESMAC Listen All
win_command:
cmd: '"C:\Program Files (x86)\Micro Focus\Enterprise Server\bin\mfds.exe" --listen-all'
tags: es

- name: Start MFDS Service
ansible.windows.win_service:
name: mf_CCITCP2
state: started
tags: es

- name: Stop ESCWA Service
ansible.windows.win_service:
name: escwa
state: stopped
tags: es

- name: Enable ESCWA Listen All
community.windows.win_lineinfile:
path: C:\ProgramData\Micro Focus\Enterprise Server\ESCWA\commonwebadmin.json
regex: 'MfRequestedEndpoint'
line: ' "MfRequestedEndpoint" : "tcp:*:10086",'
tags: es

- name: Start ESCWA Service
ansible.windows.win_service:
name: escwa
state: started
tags: es

- name: Start HACloud Service
ansible.windows.win_service:
name: mfhacloud
start_mode: auto
state: started
tags: es
ignore_errors: true
8 changes: 8 additions & 0 deletions win/es50.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- name: ES 5.0
block:
- name: Set Facts
set_fact:
installerNameES: es_50.exe
S3Prefix: ED/50/
productName: ES50
tags: es50
8 changes: 8 additions & 0 deletions win/es60.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- name: ES 6.0
block:
- name: Set Facts
set_fact:
installerNameES: es_60.exe
S3Prefix: ED/60/
productName: ES60
tags: es60
56 changes: 56 additions & 0 deletions win/es70.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
- name: ES 7.0
block:
- name: Set Facts
set_fact:
installerNameES: es_70.exe
S3Prefix: ED/70/
productName: ES70
tags: es70

- name: ES 70 PU 15
set_fact:
installerNameEDVSPU: es_70_pu15_315321.exe
productName: ES70PU15
tags: es70pu15

- name: ES 7.0 PU 16
set_fact:
installerNameEDVSPU: es_70_pu16_318103.exe
productName: ES70PU16
tags: es70pu16

- name: ES 7.0 PU 17
set_fact:
installerNameEDVSPU: es_70_pu17_320926.exe
productName: ES70PU17
tags: es70pu17

- name: ES 7.0 PU 18
set_fact:
installerNameEDVSPU: es_70_pu18_322467.exe
productName: ES70PU18
tags: es70pu18

- name: ES 7.0 PU 19
set_fact:
installerNameEDVSPU: es_70_pu19_324235.exe
productName: ES70PU19
tags: es70pu19

- name: ES 7.0 PU 20
set_fact:
installerNameEDVSPU: es_70_pu20_328615.exe
productName: ES70PU20
tags: es70pu20

- name: ES 7.0 PU 21
set_fact:
installerNameEDVSPU: es_70_pu21_330880.exe
productName: ES70PU21
tags: es70pu21

- name: ES 7.0 PU 22
set_fact:
installerNameEDVSPU: es_70_pu22_337404.exe
productName: ES70PU22
tags: es70pu22
60 changes: 60 additions & 0 deletions win/es80.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
- name: ES 8.0
set_fact:
installerNameES: es_80.exe
S3Prefix: ED/80/
productName: ES80
tags: es80

- name: ES 8.0 PU 5
set_fact:
installerNameESPU: es_80_pu05_318643.exe
productName: ES80PU5
tags: es80pu5

- name: ES 8.0 PU 6
set_fact:
installerNameESPU: es_80_pu06_321065.exe
productName: ES80PU6
tags: es80pu6

- name: ES 8.0 PU 7
set_fact:
installerNameESPU: es_80_pu07_323531.exe
productName: ES80PU7
tags: es80pu7

- name: ES 8.0 PU 8
set_fact:
installerNameESPU: es_80_pu08_324719.exe
productName: ES80PU8
tags: es80pu8

- name: ES 8.0 PU 9
set_fact:
installerNameESPU: es_80_pu09_328365.exe
productName: ES80PU9
tags: es80pu9

- name: ES 8.0 PU 10
set_fact:
installerNameESPU: es_80_pu10_330752.exe
productName: ES80PU10
tags: es80pu10

- name: ES 8.0 PU 11
set_fact:
installerNameESPU: es_80_pu11_331770.exe
productName: ES80PU11
tags: es80pu11

- name: ES 8.0 PU 12
set_fact:
installerNameESPU: es_80_pu12_336862.exe
productName: ES80PU12
tags: es80pu12

- name: ES 8.0 PU 13
set_fact:
installerNameESPU: es_80_pu13_340020.exe
productName: ES80PU13
tags: es80pu13
Loading

0 comments on commit 2e49afb

Please sign in to comment.