From 9be26624834af51004d2d7d83f5b60f80d713ec5 Mon Sep 17 00:00:00 2001 From: asmallco Date: Tue, 7 Jul 2026 15:13:26 -0900 Subject: [PATCH] Add alchemy.yml --- alchemy.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 alchemy.yml diff --git a/alchemy.yml b/alchemy.yml new file mode 100644 index 0000000..db00384 --- /dev/null +++ b/alchemy.yml @@ -0,0 +1,25 @@ +--- +- name: Simple Non-Root Playbook + hosts: localhost + gather_facts: false + tasks: + - name: 1. Check who is running the playbook + ansible.builtin.command: whoami + register: user_check + + - name: 2. Print the username to the console + ansible.builtin.debug: + msg: "This playbook is running as user {{ user_check.stdout }}" + + - name: 3. Create a test file in the home directory + ansible.builtin.copy: + content: "Hello, this file was created using Ansible without sudo!" + dest: "~/ansible_test_file.txt" + + - name: 4. Verify the file contents + ansible.builtin.command: cat ~/ansible_test_file.txt + register: file_output + + - name: 5. Display the file output + ansible.builtin.debug: + msg: "{{ file_output.stdout }}"