- name: md2html exists # noqa: name[casing] ansible.builtin.stat: path: /var/www/bin/md2html register: obsd_cgit_md2html_bin - name: Install lowdown package ansible.builtin.package: name: lowdown state: present when: not obsd_cgit_md2html_bin.stat.exists - name: Copy md2html into /tmp ansible.builtin.copy: src: md2html.c dest: /tmp/ owner: root group: wheel mode: "0755" - name: Ensure /var/www/bin directory exists ansible.builtin.file: path: "/var/www/bin" state: directory owner: root group: bin mode: "0755" - name: Statically compile md2html to /var/www/bin/md2html ansible.builtin.command: | cc md2html.c \ -o /var/www/bin/md2html \ -I/usr/local/include \ -L/usr/local/lib \ -llowdown \ -lm \ -static \ -pie \ -s args: chdir: /tmp creates: /var/www/bin/md2html - name: Ensure root:bin owns md2html binary ansible.builtin.file: path: /var/www/bin/md2html owner: root group: bin mode: "0755" - name: Remove lowdown package ansible.builtin.package: name: lowdown state: absent