-
Notifications
You must be signed in to change notification settings - Fork 0
/
nightmarionne_server.yml
61 lines (51 loc) · 1.89 KB
/
nightmarionne_server.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
- name: Nightmarionne Server for RHEL 8 Systems
connection: ssh
gather_facts: false
hosts: all
tasks:
- name: NIGHTMARIONNE SERVER | Install Git
ansible.builtin.yum:
name: git
- name: NIGHTMARIONNE SERVER | Install Puppet | RHEL 8
ansible.builtin.yum:
name: http://yum.puppet.com/puppet-release-el-8.noarch.rpm
disable_gpg_check: True
- name: NIGHTMARIONNE SERVER | Install Puppet Agent | Yum
ansible.builtin.yum:
name: puppetserver
disable_gpg_check: True
- name: NIGHTMARIONNE SERVER | Remove modules
ansible.builtin.file:
path: /etc/puppetlabs/code/environment/production/modules
state: absent
- name: NIGHTMARIONNE SERVER | Remove manifests
ansible.builtin.file:
path: /etc/puppetlabs/code/environment/production/manifests
state: absent
- name: NIGHTMARIONNE SERVER | Add Latest Code
ansible.builtin.git:
repo: '[email protected]:jabbate19/Nightmarionne.git'
dest: /etc/puppetlabs/code/environment/production
accept_hostkey: yes
force: yes
- name: NIGHTMARIONNE SERVER | Set Certname
shell: "/opt/puppetlabs/bin/puppet config set certname nightmarionne.skillissue.fyi --section server"
- name: NIGHTMARIONNE SERVER | Set Autosign
shell: "/opt/puppetlabs/bin/puppet config set autosign true --section server"
- name: NIGHTMARIONNE SERVER | Start Server Service
ansible.builtin.service:
name: puppetserver
state: started
- name: NIGHTMARIONNE SERVER | Set iptables port forward
ansible.builtin.iptables:
table: nat
chain: PREROUTING
in_interface: ens18
protocol: tcp
match: tcp
destination_port: 443
jump: REDIRECT
to_ports: 8140
- name: Set a hostname
ansible.builtin.hostname:
name: nightmarionne.skillissue.fyi