ansible/roles/copr/base/tasks/main.yml

93 lines
2.3 KiB
YAML
Raw Normal View History

---
# tasklist for setting up copr
# This is the base set of files needed for copr
# again to late to do it here
# - import_tasks: "{{ tasks_path }}/cloud_setup_basic.yml"
# already included into the `base` role
#- import_tasks: "{{ tasks_path }}/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
2020-02-20 11:25:37 +01:00
- name: enable service tmp.mount and ensure it is not masked
systemd:
name: tmp.mount
enabled: yes
masked: no
- name: enable epel for non-fedora hosts
package: 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
2015-04-01 13:47:11 +00:00
copy: src="hosts" dest=/etc/ owner=root group=root mode=644
tags:
- config
2019-08-04 20:57:28 +02:00
- name: configure crond
copy: src=sysconfig.crond dest=/etc/sysconfig/crond
2019-02-12 13:30:57 +01:00
- name: install copr-selinux
dnf: state=latest pkg=copr-selinux
2019-04-02 10:27:12 +02:00
tags:
- packages
2019-02-12 13:30:57 +01:00
- name: install common copr packages
2019-04-02 10:27:12 +02:00
dnf:
state: present
pkg:
- "nrpe"
tags:
- packages
- name: install dev helper packages
2019-04-02 10:27:12 +02:00
dnf:
state: present
pkg:
- "bash-completion"
- "screen"
- "tmux"
tags:
- packages
- name: install ethtool
2016-02-11 09:03:11 +01:00
dnf: state=present pkg=ethtool
tags:
- packages
- name: check offloading
2016-06-25 20:42:39 +00:00
shell: "ethtool -k eth0 | egrep -q 'tcp-segmentation-offload: on|generic-receive-offload: on|generic-segmentation-offload: on'"
register: offloading
2016-06-25 20:44:52 +00:00
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
2016-06-25 20:47:09 +00:00
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
2019-08-27 12:18:33 +02:00
2020-02-20 11:25:37 +01:00
# - name: enable and run logrotate service
# service: name="logrotate" state=started