Updated to add netboot

Signed-off-by: Larry Smith Jr <mrlesmithjr@gmail.com>
This commit is contained in:
Larry Smith Jr 2017-04-04 11:43:43 -04:00
parent 1029a419c3
commit 20f6732f68
4 changed files with 47 additions and 25 deletions

View file

@ -1,9 +1,7 @@
Role Name Role Name
========= =========
Installs and configures tftpd-hpa role. An [Ansible] role to install/configure [tftpd-hpa]
[![Build Status](https://travis-ci.org/mrlesmithjr/ansible-tftpd-hpa.svg?branch=master)](https://travis-ci.org/mrlesmithjr/ansible-tftpd-hpa)
Requirements Requirements
------------ ------------
@ -13,12 +11,19 @@ None
Role Variables Role Variables
-------------- --------------
```` ```
--- ---
# defaults file for ansible-tftpd-hpa # defaults file for ansible-tftpd-hpa
tftp_directory: '/var/lib/tftpboot' #defines tftp root directory
tftp_options: '--secure -c' #defines tftp options for daemon...(-c allow new files to be created) # Defines tftp root directory
```` tftp_directory: '/var/lib/tftpboot'
# Defines tftp options for daemon...(-c allow new files to be created)
tftp_options: '--secure -c'
tftp_netboot_file: 'netboot.tar.gz'
tftp_netboot_url: 'http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot'
```
Dependencies Dependencies
------------ ------------
@ -28,25 +33,15 @@ None
Example Playbook Example Playbook
---------------- ----------------
#### GitHub ```
```` ---
- hosts: all - hosts: tftp_servers
become: true become: true
vars: vars:
roles: roles:
- role: ansible-tftpd-hpa - role: ansible-tftpd-hpa
tasks: tasks:
```` ```
#### Galaxy
````
- hosts: all
become: true
vars:
roles:
- role: mrlesmithjr.tftpd-hpa
tasks:
````
License License
------- -------
@ -56,4 +51,10 @@ BSD
Author Information Author Information
------------------ ------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed). Larry Smith Jr.
- @mrlesmithjr
- http://everythingshouldbevirtual.com
- mrlesmithjr [at] gmail.com
[Ansible]: <https://www.ansible.com>
[tftpd-hpa]: <https://help.ubuntu.com/community/TFTP>

View file

@ -1,4 +1,11 @@
--- ---
# defaults file for ansible-tftpd-hpa # defaults file for ansible-tftpd-hpa
tftp_directory: '/var/lib/tftpboot' #defines tftp root directory
tftp_options: '--secure -c' #defines tftp options for daemon...(-c allow new files to be created) # Defines tftp root directory
tftp_directory: '/var/lib/tftpboot'
# Defines tftp options for daemon...(-c allow new files to be created)
tftp_options: '--secure -c'
tftp_netboot_file: 'netboot.tar.gz'
tftp_netboot_url: 'http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot'

View file

@ -1,6 +1,6 @@
galaxy_info: galaxy_info:
author: Larry Smith Jr. author: Larry Smith Jr.
description: Installs and configures tftpd-hpa role. description: An [Ansible] role to install/configure [tftpd-hpa]
#company: your company (optional) #company: your company (optional)
# If the issue tracker for your role is not on github, uncomment the # If the issue tracker for your role is not on github, uncomment the
@ -111,6 +111,7 @@ galaxy_info:
- trusty - trusty
# - utopic # - utopic
# - vivid # - vivid
- xenial
#- name: SLES #- name: SLES
# versions: # versions:
# - all # - all

View file

@ -23,3 +23,16 @@
group: root group: root
mode: 0644 mode: 0644
notify: restart tftpd-hpa notify: restart tftpd-hpa
- name: config_tftpd | Downloading Netboot
get_url:
url: "{{ tftp_netboot_url }}/{{ tftp_netboot_file }}"
dest: "{{ tftp_directory }}/{{ tftp_netboot_file }}"
- name: config_tftpd | Extracting Netboot
unarchive:
src: "{{ tftp_directory }}/{{ tftp_netboot_file }}"
dest: "{{ tftp_directory }}"
copy: no
args:
creates: "{{ tftp_directory }}/pxelinux.0"