--- - name: Configure mini-monitoring server hosts: smolmonitor tasks: - name: Performing APT cache update and package upgrade ansible.builtin.apt: upgrade: yes update_cache: yes cache_valid_time: 86400 become: true become_method: sudo - name: Update/install necessary packages ansible.builtin.package: name: - vim - wget - curl - openssl state: latest become: true become_method: sudo - name: Download vim config from aperture (root) ansible.builtin.get_url: dest: ~/.vimrc url: https://aperture.dismyserver.net/.vimrc become: true become_method: sudo - name: Verify misc script dir exists ansible.builtin.file: path: /opt/sublight/scripts state: directory ####- certificate monitoring script - name: Verify certificate script is deployed ansible.builtin.template: dest: /opt/sublight/scripts/collect-certdata.sh src: ~/ansible/templates/collect-certdata.sh.j2 mode: '0744' - name: Ensure cert monitoring script is scheduled ansible.builtin.cron: name: "Poll cert data" minute: "*" job: "/opt/sublight/scripts/collect-certdata.sh" user: root state: present become: true become_method: sudo ####- endlessh monitoring script - name: Verify certificate script is deployed ansible.builtin.template: dest: /opt/sublight/scripts/collect-endlesshdata.sh src: ~/ansible/templates/collect-endlesshdata.sh.j2 mode: '0744' - name: Ensure cert monitoring script is scheduled ansible.builtin.cron: name: "Poll endlessh data" minute: "*" job: "/opt/sublight/scripts/collect-endlesshdata.sh" user: root state: present become: true become_method: sudo