Skip to content

Commit 87e0ed6

Browse files
committed
TFTP feature
1 parent c6abbae commit 87e0ed6

7 files changed

Lines changed: 47 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ jobs:
159159
--add-feature google \
160160
--add-feature remote-execution \
161161
--add-feature bmc \
162+
--add-feature tftp \
162163
${{ matrix.iop == 'enabled' && '--add-feature iop' || '' }}
163164
- name: Run health check
164165
run: |

docs/user/parameters.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ There are multiple use cases from the users perspective that dictate what parame
111111
| --------- | ----------- | ---------------------------- |
112112
| `--bmc-ipmi-implementation` | IPMI implementation to use for BMC | `--foreman-proxy-bmc-default-provider` |
113113
| `--bmc-redfish-verify-ssl` | Verify SSL certificates for Redfish BMC connections | `--foreman-proxy-bmc-redfish-verify-ssl` |
114+
| `--add-feature tftp` | Enable TFTP feature | `--foreman-proxy-tftp` |
115+
| `--tftp-servername` | | `--foreman-proxy-tftp-servername` |
116+
| `--tftp-root` | Directory for TFTP | `--foreman-proxy-tftp-root` |
117+
| `--tftp-connect-timeout` | Connection timeout in seconds needed to download tftp artifacts, like initrd and vmlinuz. | |
118+
| `--tftp-verify-server-cert` | Verify server certificate when downloading tftp artifacts. When false, the argument `--no-check-certificate` will be used. | |
114119

115120
### Undetermined
116121

@@ -143,10 +148,7 @@ There are multiple use cases from the users perspective that dictate what parame
143148
| `--foreman-proxy-plugin-dns-route53-aws-access-key` | | foreman_proxy::plugin::dns_route53 | aws_access_key |
144149
| `--foreman-proxy-plugin-dns-route53-aws-secret-key` | | foreman_proxy::plugin::dns_route53 | aws_secret_key |
145150
| `--foreman-proxy-httpboot` | | foreman_proxy | httpboot |
146-
| `--foreman-proxy-tftp` | | foreman_proxy | tftp |
147-
| `--foreman-proxy-tftp-servername` | | foreman_proxy | tftp_servername |
148151
| `--foreman-proxy-tftp-managed` | | foreman_proxy | tftp_managed |
149-
| `--foreman-proxy-tftp-root` | | foreman_proxy | tftp_root |
150152
| `--foreman-proxy-plugin-dhcp-remote-isc-dhcp-config` | | foreman_proxy::plugin::dhcp_remote_isc | config |
151153
| `--foreman-proxy-plugin-dhcp-remote-isc-dhcp-leases` | | foreman_proxy::plugin::dhcp_remote_isc | dhcp_config |
152154
| `--foreman-proxy-plugin-dhcp-remote-isc-key-name` | | foreman_proxy::plugin::dhcp_remote_isc | key_name |

src/features.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,7 @@ bmc:
5858
description: Power management for bare metal hosts (IPMI, Redfish)
5959
foreman_proxy:
6060
plugin_name: bmc
61+
tftp:
62+
description: Enable TFTP feature on Foreman Proxy
63+
foreman_proxy:
64+
plugin_name: tftp

src/playbooks/deploy/metadata.obsah.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@ variables:
5656
parameter: --bmc-redfish-verify-ssl
5757
help: Verify SSL certificates for Redfish BMC connections.
5858
type: Boolean
59+
foreman_proxy_tftp_root:
60+
parameter: --tftp-root
61+
help: Directory to serve TFTP files from.
62+
type: AbsolutePath
63+
foreman_proxy_tftp_servername:
64+
parameter: --tftp-servername
65+
help: Server name to use for TFTP.
66+
foreman_proxy_tftp_connect_timeout:
67+
parameter: --tftp-connect-timeout
68+
help: Connection timeout in seconds needed to download tftp artifacts, like initrd and vmlinuz.
69+
foreman_proxy_tftp_verify_server_cert:
70+
parameter: --tftp-verify-server-cert
71+
help: Verify server certificate when downloading tftp artifacts. When false, the argument `--no-check-certificate` will be used.
72+
type: Boolean
5973

6074
constraints:
6175
required_together:

src/roles/foreman_proxy/defaults/main.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ foreman_proxy_foreman_server_url: "https://{{ ansible_facts['fqdn'] }}"
2323
# BMC settings
2424
foreman_proxy_bmc_ipmi_implementation: ipmitool
2525
foreman_proxy_bmc_redfish_verify_ssl: true
26+
27+
# TFTP settings
28+
foreman_proxy_tftp_root: /var/lib/tftpboot
29+
foreman_proxy_tftp_servername: "{{ ansible_facts['fqdn'] }}"
30+
foreman_proxy_tftp_connect_timeout: 10
31+
foreman_proxy_tftp_verify_server_cert: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
- name: Create TFTP root directory
3+
ansible.builtin.file:
4+
path: "{{ foreman_proxy_tftp_root }}"
5+
state: directory
6+
mode: '0750'
7+
owner: root
8+
group: root
9+
notify:
10+
- Restart Foreman Proxy
11+
- Refresh Foreman Proxy
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
:enabled: {{ feature_enabled }}
3+
:tftproot: {{ foreman_proxy_tftp_root }}
4+
:tftp_servername: {{ foreman_proxy_tftp_servername }}
5+
:tftp_connect_timeout: {{ foreman_proxy_tftp_connect_timeout }}
6+
:verify_server_cert: {{ foreman_proxy_tftp_verify_server_cert }}

0 commit comments

Comments
 (0)