mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-24 10:31:56 +08:00
80 lines
2.1 KiB
YAML
80 lines
2.1 KiB
YAML
---
|
|
# tasklist for setting up copr
|
|
# This is the base set of files needed for copr
|
|
|
|
|
|
# again to late to do it here
|
|
# - include: "{{ tasks }}/cloud_setup_basic.yml"
|
|
# already included into the `base` role
|
|
#- include: "{{ tasks }}/postfix_basic.yml"
|
|
|
|
# To late to do it here (
|
|
#- name: setup correct hostname for copr machine
|
|
# hostname: name="{{ copr_hostbase }}.cloud.fedoraproject.org"
|
|
# # hostname: name="{{ hostbase|regex_replace('.*-$', '')}}.cloud.fedoraproject.org"
|
|
# tags:
|
|
# - config
|
|
|
|
- name: enable epel for non-fedora hosts
|
|
yum: state=present pkg="epel-release"
|
|
when: ansible_distribution != 'Fedora'
|
|
|
|
- name: copy .forward file
|
|
copy: src="{{ _forward_src }}" dest="/root/.forward" owner=root group=root
|
|
tags:
|
|
- config
|
|
|
|
- name: deploy /etc/hosts file
|
|
copy: src="hosts" dest=/etc/ owner=root group=root mode=644
|
|
tags:
|
|
- config
|
|
|
|
- name: install copr repo
|
|
copy: src="yum/copr.repo" dest="/etc/yum.repos.d/copr.repo"
|
|
tags:
|
|
- config
|
|
|
|
- name: install common copr packages
|
|
dnf: state=present pkg={{ item }}
|
|
with_items:
|
|
#- "copr-selinux"
|
|
- "system-config-firewall-base"
|
|
- "nrpe"
|
|
tags:
|
|
- packages
|
|
|
|
- name: install dev helper packages
|
|
dnf: state=present pkg={{ item }}
|
|
with_items:
|
|
- "bash-completion"
|
|
- "screen"
|
|
- "tmux"
|
|
tags:
|
|
- packages
|
|
|
|
- name: install ethtool
|
|
dnf: state=present pkg=ethtool
|
|
tags:
|
|
- packages
|
|
|
|
- name: check offloading
|
|
shell: "ethtool -k eth0 | egrep -q 'tcp-segmentation-offload: on|generic-receive-offload: on|generic-segmentation-offload: on'"
|
|
register: offloading
|
|
failed_when: offloading.rc == 2
|
|
changed_when: "1 != 1"
|
|
check_mode: no
|
|
|
|
- name: disable offloading
|
|
command: ethtool -K eth0 tso off gro off gso off
|
|
when: offloading.rc == 0
|
|
|
|
- name: disable offloading (persitently)
|
|
lineinfile: dest=/etc/sysconfig/network-scripts/ifcfg-eth0 backup=yes state=present line='ETHTOOL_OPTS="-K ${DEVICE} tso off gro off gso off"'
|
|
tags:
|
|
- config
|
|
|
|
- name: make sure our resolv.conf is the one being used - set PEERDNS=no in /etc/sysconfig/network
|
|
lineinfile: dest=/etc/sysconfig/network create=yes backup=yes state=present line='PEERDNS=no' regexp=^PEERDNS=
|
|
tags:
|
|
- config
|