-
Notifications
You must be signed in to change notification settings - Fork 16
/
_core.yml
100 lines (83 loc) · 2.61 KB
/
_core.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/bin/bash
#
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
# ROLE NAME ####################################################################
- name: 'Register TLD'
shell: 'cat /pg/var/role.name'
register: rolename
ignore_errors: True
- name: 'Provide Role Name Information'
set_fact:
pgrole: '{{rolename.stdout}}'
# OAUTH INFO ###################################################################
- name: Check if Anti Auth Variable Exists
stat:
path: '/pg/var/oauth.exists'
register: authcheck
- name: 'OAuth Exists'
set_fact:
gauth: 'http://oauth:4181'
when: authcheck.stat.exists
- name: 'OAuth Not Exists'
set_fact:
gauth: ''
when: not authcheck.stat.exists
# RECALL PORT VARIABLES ########################################################
- name: Register Ports
shell: 'cat /pg/var/server.ports'
register: portinfo
ignore_errors: True
- name: 'Provide Ports Information'
set_fact:
serverports: '{{portinfo.stdout}}'
# DOMAIN VARIABLES #############################################################
- name: Register Domain
shell: 'cat /pg/var/server.domain'
register: domaininfo
ignore_errors: True
- name: 'Provide Domain Information'
set_fact:
domain: '{{domaininfo.stdout}}'
#### TLD VARIABLES #############################################################
- name: Register TLD
shell: 'cat /pg/var/tld.status'
register: tldinfo
ignore_errors: True
- name: 'Provide TLD Information'
set_fact:
tldset: '{{tldinfo.stdout}}'
##################################################################### OTHER VARS
- name: Register IP
shell: 'cat /pg/var/server.ip'
register: ipaddress
ignore_errors: True
- name: Register HD Path
shell: 'cat /pg/var/hd.path'
register: path
ignore_errors: True
- name: Register Auth Path
shell: 'cat /pg/var/server.ht'
register: auth
ignore_errors: True
# OVERWRITE IMAGES #############################################################
- name: Check if Image Variable Exists
stat:
path: '/pg/var/image/{{pgrole}}'
register: imagecheck
- name: 'Transfer Image Variable'
shell: 'cat /pg/var/image/{{pgrole}}'
register: imagetemp
when: imagecheck.stat.exists
- name: 'If Fact Does Not Match - Disable TLD'
set_fact:
image: '{{imagetemp.stdout}}'
when: imagecheck.stat.exists
# EXTERNAL PORT FOR END BANNER
- name: Export Internal Port
shell: 'echo {{ext1}} > /pg/tmp/program_port'
ignore_errors: True