This repository has been archived on 2024-05-02. You can view files and clone it, but cannot push or open issues or pull requests.
omni-ansible/tasks/nginx/install.yml

37 lines
840 B
YAML
Raw Normal View History

---
- name: Install Nginx and CertBot on CentOS 8 and Fedora
when: >-
(ansible_distribution == "CentOS" and ansible_distribution_major_version == "8")
or
ansible_distribution == "Fedora"
become: true
dnf:
state: "{{ _runtime_update_state }}"
name:
- nginx
- certbot
- python3-certbot-nginx
notify:
- restart-nginx
- name: Install Nginx and CertBot on CentOS 7
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
become: true
yum:
state: "{{ _runtime_update_state }}"
name:
- nginx
- certbot
- python-certbot-nginx
notify:
- restart-nginx
#
# - name: Install configuration
# become: true
# copy:
# src: nginx.conf
# dest: /etc/nginx/nginx.conf
# notify:
# - restart_nginx