123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- ---
- - name: Dependencies installed
- community.general.pkgng:
- name: git,go
- state: latest
- tags:
- - build
- - name: Source folder exists
- file: path=/usr/local/src mode=0755 state=directory
- tags:
- - build
- - name: Podgrab source deployed
- git:
- repo: "https://github.com/akhilrex/podgrab.git"
- dest: /usr/local/src/podgrab
- accept_hostkey: yes
- update: yes
- tags:
- - build
- - name: Patch podgrab for jails
- shell:
- cmd: 'sed -i -e ''s/client\/*/\/usr\/local\/src\/podgrab\/client\//'' /usr/local/src/podgrab/main.go'
- warn: false
- tags:
- - build
- - name: Build podgrab binary
- shell:
- chdir: /usr/local/src/podgrab
- cmd: go build .
- tags:
- - build
- - name: Podgrab rc file installed
- ansible.builtin.copy:
- src: podgrab.rc
- dest: /usr/local/etc/rc.d/podgrab
- mode: a+x
- - name: Podgrab enabled
- shell: sysrc podgrab_enable="YES"
- - name: Install podgrab
- ansible.builtin.copy:
- src: /usr/local/src/podgrab/podgrab
- dest: /usr/local/bin/podgrab
- remote_src: yes
- notify: Podgrab restarted
|