mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-02-02 20:59:02 +08:00
Replaces many references to 'copy' with ansible.builtin.copy Signed-off-by: Ryan Lerch <rlerch@redhat.com>
90 lines
2.1 KiB
YAML
90 lines
2.1 KiB
YAML
---
|
|
# install apache(httpd)
|
|
- name: Install apache (package)
|
|
package:
|
|
state: present
|
|
name:
|
|
- httpd
|
|
- httpd-tools
|
|
tags:
|
|
- packages
|
|
- apache
|
|
when: ansible_cmdline.ostree is not defined
|
|
|
|
- name: Install mod_http2 on rhel8 hosts
|
|
package:
|
|
state: present
|
|
name:
|
|
- mod_http2
|
|
tags:
|
|
- packages
|
|
- apache
|
|
when: ansible_distribution_major_version|int >= 8 and ansible_distribution == 'RedHat'
|
|
|
|
- name: Set apache running/enabled
|
|
service: name=httpd enabled=yes
|
|
ignore_errors: true
|
|
notify:
|
|
- reload apache
|
|
tags:
|
|
- service
|
|
- apache
|
|
|
|
# install hash randomization hotfix
|
|
- name: Hotfix - copy over new httpd init script
|
|
ansible.builtin.copy: src="{{ files }}/hotfix/httpd/httpd.init" dest=/etc/init.d/httpd
|
|
owner=root group=root mode=0755
|
|
when: ansible_distribution_major_version|int < 30 and ansible_distribution == 'Fedora'
|
|
notify:
|
|
- reload apache
|
|
tags:
|
|
- config
|
|
- hotfix
|
|
- apache
|
|
|
|
# install hash randomization hotfix
|
|
- name: Hotfix - copy over new httpd init script
|
|
ansible.builtin.copy: src="{{ files }}/hotfix/httpd/httpd.init" dest=/etc/init.d/httpd
|
|
owner=root group=root mode=0755
|
|
when: ansible_distribution_major_version|int <= 8 and ansible_distribution == 'RedHat'
|
|
notify:
|
|
- reload apache
|
|
tags:
|
|
- config
|
|
- hotfix
|
|
- apache
|
|
|
|
- name: Add appserver headers.conf
|
|
template: src="{{ files }}/httpd/headers.conf.j2" dest=/etc/httpd/conf.d/headers.conf
|
|
notify:
|
|
- reload apache
|
|
tags:
|
|
- config
|
|
- apache
|
|
- apache/headers
|
|
|
|
- name: Add appserver h2.conf
|
|
template: src="{{ files }}/httpd/h2.conf.j2" dest=/etc/httpd/conf.d/h2.conf
|
|
when: ansible_distribution == 'Fedora'
|
|
notify:
|
|
- reload apache
|
|
tags:
|
|
- config
|
|
- apache
|
|
- h2
|
|
|
|
- name: Add apache_status location for collectd
|
|
template: src="{{ files }}/httpd/apachestatus.conf" dest=/etc/httpd/conf.d/apachestatus.conf
|
|
notify:
|
|
- reload apache
|
|
tags:
|
|
- config
|
|
- apache
|
|
- apachestatus
|
|
|
|
- name: Setup logrotate to our needs
|
|
ansible.builtin.copy: src="{{ files }}/httpd/httpd.logrotate" dest=/etc/logrotate.d/httpd
|
|
tags:
|
|
- config
|
|
- apache
|