Skip to content

Commit e4bcc8b

Browse files
committed
Update modules names to recent ansible version req
1 parent f95409d commit e4bcc8b

6 files changed

+32
-31
lines changed

handlers/main.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
22
- name: restart tftp
3-
service:
3+
ansible.builtin.service:
44
name: tftp
55
state: restarted
66

77
- name: restart bind
8-
service:
8+
ansible.builtin.service:
99
name: named
1010
state: restarted
1111

1212
- name: restart haproxy
13-
service:
13+
ansible.builtin.service:
1414
name: haproxy
1515
state: restarted
1616

1717
- name: restart dhcpd
18-
service:
18+
ansible.builtin.service:
1919
name: dhcpd
2020
state: restarted
2121

2222
- name: restart httpd
23-
service:
23+
ansible.builtin.service:
2424
name: httpd
2525
state: restarted

tasks/configure_bind_dns.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@
1111
- name: Setup named configuration files
1212
block:
1313
- name: Write out named file
14-
template:
14+
ansible.builtin.template:
1515
src: ../templates/named.conf.j2
1616
dest: /etc/named.conf
1717
notify:
1818
- restart bind
1919
- name: Set zone serial number
20-
shell: "/usr/local/bin/set-dns-serial.sh"
20+
ansible.builtin.shell: "/usr/local/bin/set-dns-serial.sh"
2121
register: dymanicserialnumber
2222

2323
- name: Setting serial number as a fact
24-
set_fact:
24+
ansible.builtin.set_fact:
2525
serialnumber: "{{ dymanicserialnumber.stdout }}"
2626

2727
- name: Write out "{{ dns.domain | lower }}" zone file
28-
template:
28+
ansible.builtin.template:
2929
src: ../templates/zonefile.j2
3030
dest: /var/named/zonefile.db
3131
mode: '0644'
3232
notify:
3333
- restart bind
3434

3535
- name: Write out reverse zone file
36-
template:
36+
ansible.builtin.template:
3737
src: ../templates/reverse.j2
3838
dest: /var/named/reverse.db
3939
mode: '0644'

tasks/configure_dhcpd.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99

1010
tasks:
1111
- name: Write out dhcp file
12-
template:
12+
ansible.builtin.template:
1313
src: ../templates/dhcpd.conf.j2
1414
dest: /etc/dhcp/dhcpd.conf
1515
notify:
1616
- restart dhcpd
1717
when: not uefi
18+
1819
- name: Write out dhcp file (UEFI)
19-
template:
20+
ansible.builtin.template:
2021
src: ../templates/dhcpd-uefi.conf.j2
2122
dest: /etc/dhcp/dhcpd.conf
2223
notify:

tasks/configure_haproxy_lb.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
tasks:
1010
- name: Write out haproxy config file
11-
template:
11+
ansible.builtin.template:
1212
src: ../templates/haproxy.cfg.j2
1313
dest: /etc/haproxy/haproxy.cfg
1414
notify:

tasks/configure_tftp_pxe.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
tasks:
1111
- name: Set the bootstrap specific tftp file
12-
template:
12+
ansible.builtin.template:
1313
src: ../templates/pxe-bootstrap.j2
1414
dest: "/var/lib/tftpboot/pxelinux.cfg/01-{{ bootstrap.macaddr | lower | regex_replace (':', '-')}}"
1515
mode: 0555
@@ -18,7 +18,7 @@
1818
when: bootstrap is defined
1919

2020
- name: Set the master specific tftp files
21-
template:
21+
ansible.builtin.template:
2222
src: ../templates/pxe-master.j2
2323
dest: "/var/lib/tftpboot/pxelinux.cfg/01-{{ item.macaddr | regex_replace (':', '-')}}"
2424
mode: 0555
@@ -27,7 +27,7 @@
2727
- restart tftp
2828

2929
- name: Set the worker specific tftp files
30-
template:
30+
ansible.builtin.template:
3131
src: ../templates/pxe-worker.j2
3232
dest: "/var/lib/tftpboot/pxelinux.cfg/01-{{ item.macaddr | regex_replace (':', '-')}}"
3333
mode: 0555

vars/main.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,45 @@ uefi: false
44
disk: vda #disk where you are installing RHCOS on the masters/workers
55
helper:
66
name: "bastion" #hostname for your helper node
7-
ipaddr: "192.168.100.254" #current IP address of the helper
7+
ipaddr: "172.20.30.254" #current IP address of the helper
88
networkifacename: "ens3" #interface of the helper node,ACTUAL name of the interface, NOT the NetworkManager name
99
dns:
10-
domain: "example.com" #DNS server domain. Should match baseDomain inside the install-config.yaml file.
11-
clusterid: "ocp4" #needs to match what you will for metadata.name inside the install-config.yaml file
10+
domain: "cloudlabske.io" #DNS server domain. Should match baseDomain inside the install-config.yaml file.
11+
clusterid: "ocp" #needs to match what you will for metadata.name inside the install-config.yaml file
1212
forwarder1: "8.8.8.8" #DNS forwarder
1313
forwarder2: "1.1.1.1" #second DNS forwarder
1414
lb_ipaddr: "{{ helper.ipaddr }}" #Load balancer IP, it is optional, the default value is helper.ipaddr
1515
dhcp:
16-
router: "192.168.100.1" #default gateway of the network assigned to the masters/workers
17-
bcast: "192.168.100.255" #broadcast address for your network
16+
router: "172.20.30.1" #default gateway of the network assigned to the masters/workers
17+
bcast: "172.20.30.255" #broadcast address for your network
1818
netmask: "255.255.255.0" #netmask that gets assigned to your masters/workers
19-
poolstart: "192.168.100.10" #First address in your dhcp address pool
20-
poolend: "192.168.100.50" #Last address in your dhcp address pool
21-
ipid: "192.168.100.0" #ip network id for the range
19+
poolstart: "172.20.30.50" #First address in your dhcp address pool
20+
poolend: "172.20.30.80" #Last address in your dhcp address pool
21+
ipid: "172.20.30.0" #ip network id for the range
2222
netmaskid: "255.255.255.0" #networkmask id for the range.
2323
ntp: "time.google.com" #ntp server address
2424
dns: "" #domain name server, it is optional, the default value is set to helper.ipaddr
2525
bootstrap:
2626
name: "bootstrap" #hostname (WITHOUT the fqdn) of the bootstrap node
27-
ipaddr: "192.168.100.10" #IP address that you want set for bootstrap node
27+
ipaddr: "172.20.30.10" #IP address that you want set for bootstrap node
2828
macaddr: "52:54:00:a4:db:5f" #The mac address for dhcp reservation
2929
masters:
3030
- name: "master01" #hostname (WITHOUT the fqdn) of the master node (x of 3)
31-
ipaddr: "192.168.100.11" #The IP address (x of 3) that you want set
31+
ipaddr: "172.20.30.11" #The IP address (x of 3) that you want set
3232
macaddr: "52:54:00:8b:a1:17" #The mac address for dhcp reservation
3333
- name: "master02"
34-
ipaddr: "192.168.100.12"
34+
ipaddr: "172.20.30.12"
3535
macaddr: "52:54:00:ea:8b:9d"
3636
- name: "master03"
37-
ipaddr: "192.168.100.13"
37+
ipaddr: "172.20.30.13"
3838
macaddr: "52:54:00:f8:87:c7"
3939
workers:
4040
- name: "worker01" #hostname (WITHOUT the fqdn) of the worker node you want to set
41-
ipaddr: "192.168.100.21" #The IP address that you want set (1st node)
41+
ipaddr: "172.20.30.21" #The IP address that you want set (1st node)
4242
macaddr: "52:54:00:31:4a:39" #The mac address for dhcp reservation (1st node)
4343
- name: "worker02"
44-
ipaddr: "192.168.100.22"
44+
ipaddr: "172.20.30.22"
4545
macaddr: "52:54:00:6a:37:32"
4646
- name: "worker03"
47-
ipaddr: "192.168.100.23"
47+
ipaddr: "172.20.30.23"
4848
macaddr: "52:54:00:95:d4:ed"

0 commit comments

Comments
 (0)