diff --git a/02_stat.yml b/02_stat.yml new file mode 100644 index 0000000..f387a25 --- /dev/null +++ b/02_stat.yml @@ -0,0 +1,15 @@ +--- +- name: Use Ansible Shell + hosts: linuxservers + become: true + + tasks: + - name: Check if aws-cli is installed + ansible.builtin.stat: + path: /usr/local/aws-cli + register: awsinstallfile + + - name: Install aws-cli + ansible.builtin.shell: | + ~/aws/install + when: not awsinstallfile.stat.exists