-
Notifications
You must be signed in to change notification settings - Fork 0
/
standalone.yml
201 lines (175 loc) · 5.54 KB
/
standalone.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# Example playbook for a standalone CentOS Dell R815 server
---
- hosts: localhost
vars:
ansible_connection: local
ansible_python_interpreter: "{{ansible_playbook_python}}"
inventory_hostname: exia.CHANGEME.edu.au
vars_files:
- group_vars/all
pre_tasks:
- name: YUM install the 'Development tools' package group
yum:
name: "@Development tools"
state: present
update_cache: yes
- name: YUM install Java, JDK etc
yum:
name:
- java-1.8.0-openjdk
- icedtea-web
state: present
update_cache: yes
roles:
- repo_rocks_wolfpack
- fs_autofs
- role: common
vars:
dummy: 'dummy'
- role: sec_selinux_disable
- role: sec_hosts_access
vars:
hosts_allow_profile: 'login'
- role: hw_dell_dsu
vars:
install_dsu: false
install_omsa: false
- role: nw_ipv6_disable
# we noticed mlnx nic logical name change after the installation
# so we should install the mlnx_ofed driver manually prior running
# the bluefish deployment. We keep this section here just for demo
# purposes.
# - role: nw_mlnx_ofed
# vars:
# install_mlnx_ofed: true
# mlnx_ofed_installer_opts: '--force --with-neohost-backend'
- role: nw_linux_bonding
vars:
config_cx4_lx: true
cx4_lx_bond_ip: '10.0.1.149'
cx4_lx_bond_dev_file: '{{ ansible_env.HOME }}/cx4_lx_bond_dev'
- role: nw_dice_lldp
vars:
dice_lldp_dev_file: '{{ ansible_env.HOME }}/dice_lldp_dev'
- role: nw_dice_vlan
vars:
config_dice_vlan_8021q_tagging: true
dice_vlan_8021q_trunk_dev: 'em3'
dice_vlan_8021q_ips:
- vlan_10:
vlan: 'vlan_10'
ip: '192.168.11.149'
- vlan_20:
vlan: 'vlan_20'
ip: '192.168.20.149'
- vlan_30:
vlan: 'vlan_30'
ip: '192.168.30.242'
- vlan_50:
vlan: 'vlan_50'
ip: '192.168.50.149'
- vlan_60:
vlan: 'vlan_60'
ip: '192.168.60.149'
config_dice_vlan_untagged: true
dice_vlan_untagged_ips:
- vlan_11:
vlan: 'vlan_11'
dev: 'em1'
ip: '192.168.12.149'
- vlan_40:
vlan: 'vlan_40'
dev: 'em4'
ip: '192.168.40.149'
- role: nw_xrdp
post_tasks:
- name: YUM Rocks-7.0 install additional packages from Rocks repo
yum:
name:
- singularity
- panfs
- panfs-apps
state: present
update_cache: yes
enablerepo: Rocks-7.0
- name: YUM EPEL install additional packages from EPEL repo
yum:
name:
- htop
- net-tools
- bind-utils
- mailx
state: present
update_cache: yes
enablerepo: epel
- name: POSTFIX SMTP relay main.cf
command: postconf -e "{{ item.key }}"="{{ item.value }}"
with_items:
- { key: 'mydomain', value: 'local' }
- { key: 'mydestination', value: '$mydomain, $myhostname, localhost.$mydomain, localhost' }
- { key: 'mynetworks', value: '127.0.0.0/8, 10.0.0.0/16, 192.168.10.0/24, 192.168.11.0/24, 192.168.12.0/24, 192.168.20.0/24, 192.168.30.0/24, 192.168.40.0/24, 192.168.50.0/24, 192.168.60.0/24' }
- { key: 'inet_interfaces', value: 'all' }
- { key: 'append_dot_mydomain', value: 'no' }
- { key: 'sender_canonical_maps', value: 'hash:/etc/postfix/sender-canonical' }
- { key: 'recipient_canonical_maps', value: 'hash:/etc/postfix/recipient-canonical' }
- { key: 'relayhost', value: 'smtp.CHANGEME.edu.au:25' }
- { key: 'relay_domains', value: 'CHANGEME.edu.au' }
notify: restart postfix
- name: POSTFIX SMTP relay sender-canonical
blockinfile:
dest: /etc/postfix/sender-canonical
marker: "### {mark} ANSIBLE MANAGED BLOCK"
block: |
@local @exia
create: yes
notify: restart postfix
- name: POSTFIX SMTP relay generate sender-canonical db
command: postmap hash:/etc/postfix/sender-canonical
notify: restart postfix
- name: POSTFIX SMTP relay recipient-canonical
blockinfile:
dest: /etc/postfix/recipient-canonical
marker: "### {mark} ANSIBLE MANAGED BLOCK"
block: |
[email protected] root
create: yes
notify: restart postfix
- name: POSTFIX SMTP relay generate recipient-canonical db
command: postmap hash:/etc/postfix/recipient-canonical
notify: restart postfix
- name: /etc/aliases config admin email address
blockinfile:
dest: /etc/aliases
marker: "### {mark} ANSIBLE MANAGED BLOCK"
block: |
root: [email protected]
create: yes
notify: restart postfix
- name: FIREWALLD configure services such as HTTP/HTTPS
firewalld:
zone: public
service: "{{ item }}"
permanent: yes
immediate: yes
state: enabled
with_items:
- http
- https
- dns
- smtp
- smtps
- name: FIREWALLD configure ports for nagios etc
firewalld:
zone: public
port: "{{ item }}"
permanent: yes
immediate: yes
state: enabled
with_items:
- '18888/tcp'
- name: NetworkManager disabled the service
service:
name: NetworkManager
state: stopped
enabled: no
- debug: msg="** completed ** please reboot the server now."