bertvv / ansible-role-tftp Goto Github PK
View Code? Open in Web Editor NEWInstalls a TFTP server on RHEL/CentOS 7
Home Page: https://galaxy.ansible.com/bertvv/tftp/
License: Other
Installs a TFTP server on RHEL/CentOS 7
Home Page: https://galaxy.ansible.com/bertvv/tftp/
License: Other
Hi folks, thanks for sharing the stuff, was looking for a non-xinetd TFTP for my deployments.
I've been playing with the role on CentOS 7 minimal and "standard" versions, and found it's not running out of box due to some missing bits.
Issue #1
The playbook won't run due to missing "policycoreutils-python"
Solution
../tftp/vars/RedHat.yml
tftp_packages:
- libsemanage-python
- policycoreutils-python
- tftp-server
--- end of Issue #1
Issue #2
TFTP won't be accessible due to missing firewalld rule
Solution
../tftp/handlers/main.yml
- name: restart firewalld
service:
name: firewalld
state: restarted
Alternative handler (tested, less preferable)
#- name: restart firewalld
# command: systemctl restart firewalld
Standard service handler below will cause firewalld to stop on CentOS 7
#- name: reload firewalld
# service:
# name: firewalld
# state: reloaded
../tftp/tasks/main.yml
- name: Allow access to TFTP service in firewalld
firewalld:
service: tftp
permanent: yes
state: enabled
tags: tftp
notify:
- restart firewalld
--- end of Issue #2
Cheers,
It seems like you shouldn't need to run xinetd, and can instead use tftp.socket unit to do the TFTP service activation. Would you like a patch that adds that as an option?
The link to a test playbook in the README here results in a 404.
This role fails on RHEL8.1 if ansible_python_interpreter : /usr/bin/python3.6
is used because of some dependencies.
TASK [bertvv.tftp : Install packages] *****************************************************************
failed: [192.168.1.254] (item=libsemanage-python) => {"ansible_loop_var": "item", "changed": false, "failures": ["No package libsemanage-python available."], "item": "libsemanage-python", "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
ok: [192.168.1.254] => (item=tftp-server)
Fixed by changing vars/RedHat.yml
section:
tftp_packages:
# - libsemanage-python
- python3-policycoreutils
- python3-libselinux
- python3-libsemanage
- tftp-server
So instead of using libsemanage-python
i updated it to python3-libsemanage
.
Otherwise works great and does it's job!
Thank you.
Having tftp_packages set in vars/main.yml leads to inability to override those at host_vars level.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.