main.yml - ansible-roles - A collection of ansible roles I have created over the years.
 (HTM) git clone git://jay.scot/ansible-roles
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       main.yml (1305B)
       ---
            1 ---
            2 - name: Include OS-specific variables.
            3   ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
            4 
            5 - name: Install required packages
            6   ansible.builtin.package:
            7     name: "{{ common_packages }}"
            8     state: present
            9 
           10 - name: Git checkout
           11   ansible.builtin.git:
           12     repo: "{{ source_repo }}"
           13     dest: "{{ build_path }}"
           14     force: false
           15     version: "{{ stagit_gopher.git_branch }}"
           16   register: repo_clone
           17   failed_when:
           18     - repo_clone.failed
           19     - not 'Local modifications exist in the destination' in repo_clone.msg
           20 
           21 - name: Enable old libgit2 workaround
           22   ansible.builtin.replace:
           23     path: "{{ build_path }}/Makefile"
           24     regexp: '^#STAGIT_CFLAGS'
           25     replace: 'STAGIT_CFLAGS'
           26   when: enable_old_libgit2
           27 
           28 - name: Build from source
           29   community.general.system.make:
           30     chdir: "{{ build_path }}"
           31   notify: Install stagit
           32 
           33 - name: Create stagit run script
           34   ansible.builtin.template:
           35     src: templates/stagit_create.sh.j2
           36     dest: "/home/{{ stagit_gopher.cron_user }}/stagit_create.sh"
           37     owner: "{{ stagit_gopher.cron_user }}"
           38     group: "{{ stagit_gopher.cron_group }}"
           39     mode: "755"
           40 
           41 - name: Adding script to cron
           42   ansible.builtin.cron:
           43     name: "run stagit script"
           44     user: "{{ stagit_gopher.cron_user }}"
           45     minute: "0"
           46     job: "/home/{{ stagit_gopher.cron_user }}/stagit_create.sh"