diff --git a/opdracht-1/main.yml b/opdracht-1/main.yml new file mode 100644 index 0000000..0ae7312 --- /dev/null +++ b/opdracht-1/main.yml @@ -0,0 +1,13 @@ +- name: Install Apache2 without apt + hosts: localhost + connection: local + become: true + tasks: + + - name: Install apache2 using command + ansible.builtin.command: apt-get install -y apache2 + register: apache_install + changed_when: "'is already the newest version' not in apache_install.stdout" + + - name: fail + ansible.builtin.command: /bin/false