2014-10-10 12:35:14 +02:00
|
|
|
---
|
|
|
|
# tasklist for setting up copr
|
|
|
|
# This is the base set of files needed for copr
|
|
|
|
|
|
|
|
|
2015-03-18 09:38:23 +01:00
|
|
|
# again to late to do it here
|
2017-10-17 17:37:03 +00:00
|
|
|
# - import_tasks: "{{ tasks_path }}/cloud_setup_basic.yml"
|
2015-03-18 09:38:23 +01:00
|
|
|
# already included into the `base` role
|
2017-10-17 17:37:03 +00:00
|
|
|
#- import_tasks: "{{ tasks_path }}/postfix_basic.yml"
|
2015-03-18 09:38:23 +01:00
|
|
|
|
|
|
|
# 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
|
2014-10-10 12:35:14 +02:00
|
|
|
|
2015-07-21 16:41:56 +02:00
|
|
|
- name: enable epel for non-fedora hosts
|
2017-10-08 22:25:52 +00:00
|
|
|
package: state=present pkg="epel-release"
|
2015-07-21 17:45:58 +02:00
|
|
|
when: ansible_distribution != 'Fedora'
|
2015-07-21 16:41:56 +02:00
|
|
|
|
2014-10-10 12:35:14 +02:00
|
|
|
- name: copy .forward file
|
|
|
|
copy: src="{{ _forward_src }}" dest="/root/.forward" owner=root group=root
|
2016-02-17 09:50:06 +01:00
|
|
|
tags:
|
|
|
|
- config
|
2014-10-10 12:35:14 +02:00
|
|
|
|
|
|
|
- name: deploy /etc/hosts file
|
2015-04-01 13:47:11 +00:00
|
|
|
copy: src="hosts" dest=/etc/ owner=root group=root mode=644
|
2016-02-17 09:50:06 +01:00
|
|
|
tags:
|
|
|
|
- config
|
2014-10-10 12:35:14 +02:00
|
|
|
|
2019-08-04 20:57:28 +02:00
|
|
|
- name: configure crond
|
|
|
|
copy: src=sysconfig.crond dest=/etc/sysconfig/crond
|
2020-02-26 14:57:58 +01:00
|
|
|
notify: restart crond
|
|
|
|
|
2020-11-11 13:52:37 +01:00
|
|
|
- name: install anacrontab
|
|
|
|
package: name=cronie-anacron state=present
|
|
|
|
|
2020-02-26 14:57:58 +01:00
|
|
|
- name: configure anacrond to not send mails to root user
|
|
|
|
lineinfile: dest=/etc/anacrontab
|
|
|
|
backup=yes
|
|
|
|
state=present
|
2021-05-03 21:03:18 +02:00
|
|
|
line='MAILTO=praiskup@fedoraproject.org'
|
2020-02-26 14:57:58 +01:00
|
|
|
regexp="^MAILTO"
|
|
|
|
notify: restart crond
|
2019-08-04 20:57:28 +02:00
|
|
|
|
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
|
|
|
|
2021-12-06 11:18:34 +01:00
|
|
|
- name: install node_exporter
|
2022-04-27 14:47:47 +02:00
|
|
|
dnf: state=present pkg=golang-github-prometheus-node-exporter
|
2021-12-06 11:18:34 +01:00
|
|
|
tags:
|
|
|
|
- packages
|
|
|
|
|
2022-11-23 12:17:34 +01:00
|
|
|
- name: restart node exporter
|
|
|
|
service: state=started enabled=yes name=node_exporter
|
|
|
|
|
2014-10-10 12:35:14 +02:00
|
|
|
- name: install dev helper packages
|
2019-04-02 10:27:12 +02:00
|
|
|
dnf:
|
|
|
|
state: present
|
|
|
|
pkg:
|
2022-11-22 23:29:56 +01:00
|
|
|
- acl # useful for ansible acl module
|
2019-04-02 10:27:12 +02:00
|
|
|
- "bash-completion"
|
|
|
|
- "screen"
|
|
|
|
- "tmux"
|
2014-10-10 12:35:14 +02:00
|
|
|
tags:
|
|
|
|
- packages
|
|
|
|
|
2015-10-05 12:15:09 +02:00
|
|
|
- name: install ethtool
|
2016-02-11 09:03:11 +01:00
|
|
|
dnf: state=present pkg=ethtool
|
2015-10-05 12:15:09 +02:00
|
|
|
tags:
|
|
|
|
- packages
|
2016-06-25 20:35:47 +00:00
|
|
|
|
|
|
|
- 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'"
|
2016-06-25 20:35:47 +00:00
|
|
|
register: offloading
|
2016-06-25 20:44:52 +00:00
|
|
|
failed_when: offloading.rc == 2
|
2016-06-25 20:35:47 +00:00
|
|
|
changed_when: "1 != 1"
|
2016-11-01 16:29:49 +00:00
|
|
|
check_mode: no
|
2016-06-25 20:35:47 +00:00
|
|
|
|
2015-10-05 12:15:09 +02:00
|
|
|
- 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
|
2016-06-25 20:35:47 +00:00
|
|
|
|
2015-10-05 12:15:09 +02:00
|
|
|
- name: disable offloading (persitently)
|
2022-11-19 14:33:27 +01:00
|
|
|
shell: "nmcli con modify 'cloud-init eth0' ethtool.feature-tso off ethtool.feature-gro off ethtool.feature-gso off"
|
|
|
|
when: offloading.rc == 0
|
2015-10-05 12:15:09 +02:00
|
|
|
tags:
|
|
|
|
- config
|
|
|
|
|
2022-11-23 12:42:10 +01:00
|
|
|
- name: check we have the needed ipv6
|
2022-11-29 21:43:11 +01:00
|
|
|
shell: "nmcli con show 'cloud-init eth0' | grep ipv6.addresses | grep {{ aws_ipv6_addr }}"
|
2022-11-23 12:42:10 +01:00
|
|
|
register: ipv6_config_check
|
|
|
|
failed_when: false
|
|
|
|
changed_when: ipv6_config_check.rc == 1
|
|
|
|
when: aws_ipv6_addr is defined
|
|
|
|
tags: ipv6_config
|
|
|
|
|
2022-11-21 11:13:35 +01:00
|
|
|
- name: setup ipv6 networking
|
2022-11-23 22:42:54 +01:00
|
|
|
shell: |
|
2022-11-28 18:24:57 +01:00
|
|
|
nmcli con modify 'cloud-init eth0' ipv6.method auto ipv6.may-fail yes ipv6.never-default no ipv6.addresses '{{ aws_ipv6_addr }}'
|
2022-11-23 22:42:54 +01:00
|
|
|
nmcli con up 'cloud-init eth0'
|
2022-11-23 12:42:10 +01:00
|
|
|
when:
|
|
|
|
- aws_ipv6_addr is defined
|
|
|
|
- ipv6_config_check.changed
|
2021-11-30 13:28:59 +01:00
|
|
|
tags: ipv6_config
|
|
|
|
|
2022-01-21 12:42:18 +01:00
|
|
|
- name: install nrpe checks
|
|
|
|
template: src=copr_nrpe.cfg
|
|
|
|
dest=/etc/nrpe.d/copr_nrpe.cfg
|
|
|
|
notify:
|
|
|
|
- restart nrpe
|
|
|
|
tags:
|
|
|
|
- nagios_client
|
|
|
|
- copr_cdn
|
|
|
|
- copr_ping
|
|
|
|
|
2019-09-04 17:59:41 +02:00
|
|
|
# - name: enable and run logrotate service
|
|
|
|
# service: name="logrotate" state=started
|