Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Andrei-Stepanov/38cb06daaab1e22ca9242e57e00797c6 to your computer and use it in GitHub Desktop.
Save Andrei-Stepanov/38cb06daaab1e22ca9242e57e00797c6 to your computer and use it in GitHub Desktop.
- block:
- name: Gather facts
setup:
delegate_facts: True
- name: Add restraint repo for restraint-rhts on Fedora hosts
when: ansible_distribution == 'Fedora'
vars:
copr_fedora_release: >
{{
'rawhide' if ansible_distribution_release == 'Rawhide'
else ansible_distribution_major_version·
}}
get_url:
url: "https://copr.fedorainfracloud.org/coprs/bpeck/restraint/repo/\
fedora-{{copr_fedora_release}}/bpeck-restraint-fedora-{{copr_fedora_release}}.repo"
dest: /etc/yum.repos.d/restraint.repo
- name: Add restraint repo for restraint-rhts on RHEL/CentOS hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment