first commit
This commit is contained in:
54
tasks/main.yml
Normal file
54
tasks/main.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
- name: Install packages
|
||||
yum:
|
||||
name: ["dhcp-server", "syslinux", "tftp", "tftp-server", "xinetd", "httpd"]
|
||||
|
||||
- name: dhcpd configuration
|
||||
template:
|
||||
src: dhcpd.conf.j2
|
||||
dest: /etc/dhcp/dhcpd.conf
|
||||
notify: Restart dhcpd
|
||||
|
||||
- name: tftp configuration
|
||||
template:
|
||||
src: tftp.j2
|
||||
dest: /etc/xinetd.d/tftp
|
||||
|
||||
- name: tftpboot directory
|
||||
file:
|
||||
name: /var/lib/tftpboot/pxelinux.cfg
|
||||
state: directory
|
||||
|
||||
- name: syslinux files
|
||||
file:
|
||||
state: hard
|
||||
src: "/usr/share/syslinux/{{ item }}"
|
||||
dest: "/var/lib/tftpboot/{{ item }}"
|
||||
loop: ["pxelinux.0", "ldlinux.c32"]
|
||||
|
||||
- name: tftpboot configuration
|
||||
template:
|
||||
src: pxelinux.cfg-default.j2
|
||||
dest: "/var/lib/tftpboot/pxelinux.cfg/{{ item.ip | ip4_hex | upper}}"
|
||||
loop: "{{ os4_pxe_install_server_clients }}"
|
||||
|
||||
- name: dhcpd service
|
||||
service:
|
||||
name: dhcpd
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: httpd service
|
||||
service:
|
||||
name: httpd
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: xinetd service
|
||||
service:
|
||||
name: xinetd
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: Configure firewalld
|
||||
import_tasks: firewalld.yml
|
||||
when: os4_pxe_install_server_firewalld_configure
|
||||
Reference in New Issue
Block a user