Initial snapshot before transformerlab recovery

This commit is contained in:
Codex
2026-03-31 13:25:25 -06:00
commit d860318d43
49 changed files with 3864 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
- name: Create Promptfoo working directories
file:
path: "{{ item }}"
state: directory
mode: "0755"
loop:
- "{{ courseware_tools_dir }}/promptfoo"
- "{{ courseware_lab6_dir }}"
- name: Install Promptfoo locally
command: "npm install promptfoo@{{ courseware_promptfoo_version }}"
args:
chdir: "{{ courseware_tools_dir }}/promptfoo"
environment:
PATH: "{{ courseware_node_runtime_bin_dir }}:{{ ansible_env.PATH }}"
- name: Force Promptfoo server to bind to the configured host
replace:
path: "{{ courseware_tools_dir }}/promptfoo/node_modules/promptfoo/dist/src/server/server.js"
regexp: '\.listen\(port, \(\) => \{'
replace: ".listen(port, process.env.COURSEWARE_BIND_HOST || '0.0.0.0', () => {"
- name: Render promptfoo starter config
template:
src: "{{ playbook_dir }}/../templates/promptfoo.yaml.j2"
dest: "{{ courseware_lab6_dir }}/promptfoo.yaml"
mode: "0644"