File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
ctf/templates/new/rust-webservice Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 11# This Ansible script is used to compile your challenge, create an archive and extract that archive on to the local host.
2- # This script only shows a proof of concept of building a C program. Change it as per your needs.
2+ # This script builds a frontend using NPM and a Rust program. Change it as per your needs.
33- name: "Build container"
44 hosts: "build-container"
55 vars_files:
1313 ansible.builtin.set_fact:
1414 track_flags: "{{ '{{ track_flags | default({}) | combine({key: value}) }}' }}"
1515
16+ - name: Check if IPv4 address is set
17+ ansible.builtin.debug:
18+ msg: IPv4 address is set
19+ when: ansible_all_ipv4_addresses | length > 0
20+
1621 - name: Initial System Upgrade
1722 ansible.builtin.apt:
1823 update_cache: true
5863 group: root
5964 mode: '0644'
6065
61- - name: NPM install
66+ - name: NPM install (if IPv4)
6267 community.general.npm:
6368 path: /tmp/{{ data.name }}/client/
6469 environment:
6570 NODE_OPTIONS: "--dns-result-order=ipv4first"
71+ when: ansible_all_ipv4_addresses | length > 0
72+
73+ - name: NPM install (if IPv6)
74+ community.general.npm:
75+ path: /tmp/{{ data.name }}/client/
76+ when: ansible_all_ipv4_addresses | length == 0
6677
6778 - name: Build
6879 ansible.builtin.command:
You can’t perform that action at this time.
0 commit comments