FOG is normally installed from its upstream installer script rather than a distro package named fog.
- name: Deploy FOG Project
hosts: fog
become: true
vars:
fog_repo: https://github.com/FOGProject/fogproject.git
fog_dir: /opt/fogproject
tasks:
- name: Install required packages
ansible.builtin.package:
name:
- git
state: present
- name: Clone FOG source
ansible.builtin.git:
repo: "{{ fog_repo }}"
dest: "{{ fog_dir }}"
version: master
- name: Run FOG installer non-interactively
ansible.builtin.command: ./installfog.sh -y
args:
chdir: "{{ fog_dir }}/bin"
register: fog_install
failed_when: false
- name: Show installer output tail
ansible.builtin.debug:
msg: "{{ fog_install.stdout_lines[-20:] if fog_install.stdout_lines is defined else [] }}"