272ed647cf
- Updated host_vars for dev-02 to include login history settings and modified code server authentication. - Adjusted opencode server configurations and reduced resource allocation. - Introduced a new playbook for configuring nginx reverse proxy with TLS and OAuth2. - Enhanced linux_dev_station role defaults and tasks, including package updates and service configurations. - Removed unnecessary credential assertions in linux_dev_station tasks. - Created nginx_proxy role with tasks for certbot, nginx installation, and oauth2-proxy setup. - Added templates for nginx and oauth2-proxy configurations. - Updated terraform configuration to reflect new DNS records for ide and agent services. - Documented changes and configurations in linux_dev_station.md for clarity and future reference.
47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
---
|
|
- name: Install nginx
|
|
become: true
|
|
ansible.builtin.dnf:
|
|
name: nginx
|
|
state: present
|
|
|
|
- name: Deploy nginx.conf
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: nginx.conf.j2
|
|
dest: /etc/nginx/nginx.conf
|
|
mode: "0644"
|
|
owner: root
|
|
group: root
|
|
notify: Reload nginx
|
|
|
|
- name: Deploy server blocks configuration
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: nginx-server.conf.j2
|
|
dest: /etc/nginx/conf.d/nginx-proxy.conf
|
|
mode: "0644"
|
|
owner: root
|
|
group: root
|
|
notify: Reload nginx
|
|
|
|
- name: Enable and start nginx
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
name: nginx
|
|
state: started
|
|
enabled: true
|
|
daemon_reload: true
|
|
|
|
- name: Set SELinux context for Let's Encrypt certificates
|
|
become: true
|
|
ansible.builtin.command: >-
|
|
semanage fcontext -a -t httpd_cert_t "/etc/letsencrypt(/.*)?"
|
|
failed_when: false
|
|
changed_when: false
|
|
|
|
- name: Restore SELinux context for Let's Encrypt directory
|
|
become: true
|
|
ansible.builtin.command: restorecon -Rv /etc/letsencrypt
|
|
changed_when: false
|