Getting started¶
Usage from TFTP clients¶
If you try to check if the TFTP server works using a TFTP client, ensure that the client host can receive UDP packets on port 69 (tftp). This port might be blocked by the firewall on the client side.
Conditional write access¶
If the tftpd__allow
variable is defined to limit the access to the
TFTP service to specific subnets, the role will automatically enable write
access in the tftpd-hpa service. The
tftpd__upload_directory
defines the name of the directory in the TFTP
root directory which will be created by the role to allow file uploads.
Example inventory¶
To configure a TFTP server on a host, you should add it to the
[debops_service_tftpd]
Ansible inventory group:
[debops_service_tftpd]
hostname
Example playbook¶
If you are using this role without DebOps, here's an example Ansible playbook
that uses the debops.tftpd
role:
---
- name: Manage TFTP service
collections: [ 'debops.debops', 'debops.roles01',
'debops.roles02', 'debops.roles03' ]
hosts: [ 'debops_service_tftpd' ]
become: True
environment: '{{ inventory__environment | d({})
| combine(inventory__group_environment | d({}))
| combine(inventory__host_environment | d({})) }}'
roles:
- role: ferm
tags: [ 'role::ferm', 'skip::ferm' ]
ferm__dependent_rules:
- '{{ tftpd__ferm__dependent_rules }}'
- role: tcpwrappers
tags: [ 'role::tcpwrappers', 'skip::tcpwrappers' ]
tcpwrappers__dependent_allow:
- '{{ tftpd__tcpwrappers__dependent_allow }}'
- role: tftpd
tags: [ 'role::tftpd', 'skip::tftpd' ]
Ansible tags¶
You can use Ansible --tags
or --skip-tags
parameters to limit what
tasks are performed during Ansible run. This can be used after a host was first
configured to speed up playbook execution, when you are sure that most of the
configuration is already in the desired state.
Available role tags:
role::tftpd
- Main role tag, should be used in the playbook to execute all of the role tasks as well as role dependencies.
Other resources¶
List of other useful resources related to the debops.tftpd
Ansible role:
- Manual pages: tftpd-hpa/in.tftpd(8)