- name: deploy ssl expiry check page hosts: apache-intranet become: true tasks: - name: move check_ssl.sh to its relevant directory copy: src: ../configs/ssl_check.sh dest: /root/ssl_check.sh owner: root group: root mode: '0755' - name: run ssl_check.sh if the page doesnt exist ansible.builtin.command: /root/ssl_check.sh args: creates: /var/www/ssl/index.html