This guide provides a full Ansible playbook to install Tito, a tool for managing RPM-based projects using git.
Note: Tito is typically installed via pip or from EPEL repository on RHEL/Fedora systems.
- name: Install Tito RPM build automation
hosts: tito
become: true
vars:
tito_install_method: "pip" # Options: pip, epel, distro
tasks:
- name: Install prerequisites (RHEL/Fedora)
dnf:
name:
- git
- rpm-build
- rpmdevtools
- python3
- python3-pip
state: present
when: ansible_os_family == "RedHat"
- name: Enable EPEL repository (if needed)
dnf:
name: epel-release
state: present
when:
- ansible_os_family == "RedHat"
- tito_install_method == "epel"
- name: Install Tito from EPEL
dnf:
name: tito
state: present
when: tito_install_method == "epel"
- name: Install Tito via pip
pip:
name: tito
state: present
executable: pip3
when: tito_install_method == "pip"
- name: Verify Tito is available
command: "tito --version"
register: tito_version
changed_when: false
failed_when: false
- name: Show detected Tito version
debug:
var: tito_version.stdout
- name: Install Tito from EPEL
hosts: tito
become: true
tasks:
- name: Enable EPEL and install Tito
dnf:
name:
- epel-release
- tito
state: present
tito init.tito/tito.props for your project- name: Initialize Tito in project repository
hosts: tito
become: false # Run as user for git operations
tasks:
- name: Initialize Tito
command: tito init
args:
chdir: /path/to/your/project
register: tito_init
changed_when: "'Created' in tito_init.stdout"
failed_when: false
- name: Show initialization result
debug:
var: tito_init.stdout_lines
tito tagtito build --rpmtito build --srpmtito build --kojiWe develop tailored automation solutions for:
Let’s discuss your requirements: office@linux-server-admin.com | Contact
References: