Create an Ansible "Hello world" playbook that contains two tasks with instructions on…
- User
Create an Ansible "Hello world" playbook that contains two tasks with instructions on how to test it.
Assistant
Sure, here's an example playbook for "Hello world" that tests two tasks:
- name: Test hello world hosts: localhost become: yes tasks: - name: Check the output of "{{ item.stdout }}" set_fact: output: "Output of {{ item.stdout }}" - name: Print "Hello, world!" set_fact: message: "Hello, world!" when_not_empty: yes - name: Test output is correct set_fact: output: "Output of {{ output }}" when_not_empty: yes - name: Print "Hello, world!" set_fact: message: "Hello, world!" when_not_empty: yes - name: Check if output is correct set_fact: output: "Output of {{ item.stdout }}\n" run_once: yes - name: Print "Hello, world!" set_fact: message: "Hello, world!" when_not_empty: yes - name: Test output is wrong set_fact: output: "Output of {{ item.stdout }}\n" when_not_empty: yes - name: Print "Hello, world!" set_fact: message: "Hello, world!" when_not_empty: yes - name: Check if output is wrong set_fact: output: "Output of {{ item.stdout }}\n" run_once: yes - name: Print "Hello, world!" set_fact: message: "Hello, world!" when_not_empty: yes - name: Test output is broken set_fact: output: "Output of {{ not empty item.stdout }}\n" when_not_empty: yes - name: Print "Hello, world!" set_fact: message: "Hello, world!" when_not_empty: yes - name: Check if output is broken set_fact: output: "Output of {{ not empty item.stdout }}\n"
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.