mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 12:41:05 +01:00
Compare commits
No commits in common. "01b91ae80ff887617848e1a9c262ca66b8a31ea7" and "c5ab6ed35373b21db75785aca6121a0b806bb10c" have entirely different histories.
01b91ae80f
...
c5ab6ed353
@ -118,7 +118,6 @@ This segment caters to professional productivity needs. It encompasses a range o
|
||||
- **[PC Video Conference](./roles/pc-video-conference/)**: Video conferencing software setup.
|
||||
- **[PC Nextcloud](./roles/pc-nextcloud/)**: Client setup for Nextcloud cloud storage service.
|
||||
- **[PC GnuCash](./roles/pc-gnucash/)**: Software to manage finances
|
||||
- **[PC Jrnl](./roles/pc-jrnl/)**: CLI Journaling
|
||||
|
||||
#### Anonymization
|
||||
Focusing on privacy and security, the Anonymization section offers tools for secure file sharing and anonymous web browsing. It includes software solutions that prioritize user privacy, ensuring secure online activities and data protection.
|
||||
@ -151,7 +150,7 @@ Focuses on web server roles and applications, covering SSL certificates, Nginx c
|
||||
- **[Nginx-Homepage](./roles/nginx-homepage/)**: Configures a homepage for Nginx.
|
||||
- **[Nginx-Https](./roles/nginx-https/)**: Enables HTTPS configuration for Nginx.
|
||||
- **[Nginx-Matomo-Tracking](./roles/nginx-matomo-tracking/)**: Integrates Matomo tracking with Nginx.
|
||||
- **[Nginx-Redirect](./roles/nginx-domain-redirect/)**: Manages URL redirects in Nginx.
|
||||
- **[Nginx-Redirect](./roles/nginx-redirect/)**: Manages URL redirects in Nginx.
|
||||
- **[Certbot Nginx](./roles/certbot-nginx/)**: Integrates Certbot with Nginx for SSL certificates.
|
||||
- **[Postfix](./roles/postfix/)**: Setup for the Postfix mail transfer agent.
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
become: true
|
||||
roles:
|
||||
- pc-office
|
||||
- pc-jrnl
|
||||
|
||||
- name: personal computer for business
|
||||
hosts: business_personal_computer
|
||||
|
@ -24,7 +24,7 @@
|
||||
hosts: redirect
|
||||
become: true
|
||||
roles:
|
||||
- role: nginx-domain-redirect
|
||||
- role: nginx-redirect
|
||||
vars:
|
||||
domain_mappings: "{{redirect_domain_mappings}}"
|
||||
|
||||
|
@ -1,47 +0,0 @@
|
||||
# Ansible Role: Docker-Discourse
|
||||
|
||||
This Ansible role sets up Discourse, a popular open-source discussion platform, using Docker containers. It is designed to automate the deployment and configuration process of Discourse, making it easier to maintain and update.
|
||||
|
||||
## Role Variables
|
||||
|
||||
- `docker_compose_instance_directory`: Specifies the directory for the Docker Compose instance of Discourse.
|
||||
|
||||
## Handlers
|
||||
|
||||
- `recreate discourse`: Rebuilds the Discourse application using the launcher script. Triggered when configuration changes are detected.
|
||||
|
||||
## Tasks
|
||||
|
||||
- Includes tasks from `nginx-docker-proxy-domain.yml`.
|
||||
- Creates the specified `docker_compose_instance_directory`.
|
||||
- Checks out the repository at the specified directory.
|
||||
- Pulls the Discourse Docker repository and updates it.
|
||||
- Sets permissions for the `containers` directory.
|
||||
- Copies configuration to `containers/app.yml`.
|
||||
|
||||
## Template: app.yml.j2
|
||||
|
||||
- Configures the Discourse Docker container with necessary parameters such as database settings, environment variables, and volumes.
|
||||
- Specifies SMTP settings for email functionality.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- `nginx-docker-reverse-proxy`: This dependency is necessary for the reverse proxy setup for Discourse.
|
||||
|
||||
## Usage
|
||||
|
||||
To use this role, include it in your Ansible playbook and configure the necessary variables as per your requirements. Ensure that the dependencies are also resolved.
|
||||
|
||||
## Discussion and Contributions
|
||||
|
||||
For discussions, questions, and contributions related to this role, please refer to the corresponding discussion thread on [Discourse Meta](https://meta.discourse.org/).
|
||||
|
||||
## Notes
|
||||
|
||||
- This role is part of a larger playbook and is designed to work in conjunction with other roles.
|
||||
- Ensure you have the necessary permissions and access to run Ansible scripts in your environment.
|
||||
|
||||
---
|
||||
|
||||
This README was generated with information provided in the Ansible role. For more detailed instructions and information, refer to the inline comments within the role files. Additional support and context for this role can be found in an [online chat discussion](https://chat.openai.com/share/fdbf9870-1f7e-491f-b4d2-357e6e8ad59c).
|
||||
|
@ -1,4 +1,11 @@
|
||||
---
|
||||
#- name: recreate discourse
|
||||
# command:
|
||||
# cmd: docker-compose up -d --force-recreate
|
||||
# chdir: "{{docker_compose_instance_directory}}"
|
||||
# environment:
|
||||
# COMPOSE_HTTP_TIMEOUT: 600
|
||||
# DOCKER_CLIENT_TIMEOUT: 600
|
||||
- name: recreate discourse
|
||||
command:
|
||||
cmd: ./launcher rebuild app
|
||||
|
@ -8,6 +8,10 @@
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
#- name: add docker-compose.yml
|
||||
# template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
# notify: recreate discourse
|
||||
|
||||
- name: register directory
|
||||
stat:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
@ -41,7 +45,7 @@
|
||||
mode: '700'
|
||||
state: directory
|
||||
|
||||
- name: "copy configuration to {{docker_compose_instance_directory}}containers/app.yml"
|
||||
- name: "copy configuration {{docker_compose_instance_directory}}containers/app.yml"
|
||||
template:
|
||||
src: app.yml.j2
|
||||
dest: "{{docker_compose_instance_directory}}containers/app.yml"
|
||||
|
@ -50,7 +50,7 @@ env:
|
||||
|
||||
## TODO: The domain name this Discourse instance will respond to
|
||||
## Required. Discourse will not work with a bare IP number.
|
||||
DISCOURSE_HOSTNAME: {{domain}}
|
||||
DISCOURSE_HOSTNAME: localhost
|
||||
|
||||
## Uncomment if you want the container to be started with the same
|
||||
## hostname (-h option) as specified above (default "$hostname-$config")
|
||||
@ -63,7 +63,7 @@ env:
|
||||
## TODO: The SMTP mail server used to validate new accounts and send notifications
|
||||
# SMTP ADDRESS, username, and password are required
|
||||
# WARNING the char '#' in SMTP password can cause problems!
|
||||
DISCOURSE_SMTP_ADDRESS: {{system_email_host}}
|
||||
DISCOURSE_SMTP_ADDRESS: {{system_email_domain}}
|
||||
DISCOURSE_SMTP_PORT: 587
|
||||
DISCOURSE_SMTP_USER_NAME: {{system_email}}
|
||||
DISCOURSE_SMTP_PASSWORD: {{system_email_password}}
|
||||
@ -85,7 +85,7 @@ env:
|
||||
## The Docker container is stateless; all data is stored in /shared
|
||||
volumes:
|
||||
- volume:
|
||||
host: discourse_application_data
|
||||
host: /var/discourse/shared/standalone
|
||||
guest: /shared
|
||||
- volume:
|
||||
host: /var/discourse/shared/standalone/log/var-log
|
||||
|
34
roles/docker-discourse/templates/docker-compose.yml.j2
Normal file
34
roles/docker-discourse/templates/docker-compose.yml.j2
Normal file
@ -0,0 +1,34 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
discourse:
|
||||
image: discourse/base:release
|
||||
depends_on:
|
||||
- database
|
||||
- redis
|
||||
volumes:
|
||||
- data:/shared
|
||||
environment:
|
||||
DISCOURSE_DB_HOST: database
|
||||
DISCOURSE_DB_NAME: discourse
|
||||
DISCOURSE_DB_USERNAME: discourse
|
||||
DISCOURSE_DB_PASSWORD: {{discourse_database_password}}
|
||||
DISCOURSE_REDIS_HOST: redis
|
||||
ports:
|
||||
- "127.0.0.1:{{http_port}}:80"
|
||||
database:
|
||||
image: postgres:latest
|
||||
environment:
|
||||
POSTGRES_DB: discourse
|
||||
POSTGRES_USER: discourse
|
||||
POSTGRES_PASSWORD: {{discourse_database_password}}
|
||||
volumes:
|
||||
- database:/var/lib/postgresql/data
|
||||
redis:
|
||||
image: redis:latest
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
volumes:
|
||||
database:
|
||||
data:
|
||||
redis_data:
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: "include tasks create-proxy-with-domain-replace.yml"
|
||||
include_tasks: create-proxy-with-domain-replace.yml
|
||||
loop: "{{ domains + [source_domain] }}"
|
||||
- name: "include tasks mybb-proxy-domain.yml"
|
||||
include_tasks: mybb-proxy-domain.yml
|
||||
loop: "{{ domains + [mybb_main_domain] }}"
|
||||
loop_control:
|
||||
loop_var: domain
|
||||
|
||||
|
@ -4,4 +4,4 @@
|
||||
- name: "include task create-domain-conf.yml"
|
||||
include_tasks: create-domain-conf.yml
|
||||
vars:
|
||||
nginx_docker_reverse_proxy_extra_configuration: "sub_filter '{{source_domain}}' '{{domain}}';"
|
||||
nginx_docker_reverse_proxy_extra_configuration: "sub_filter '{{mybb_main_domain}}' '{{domain}}';"
|
@ -3,4 +3,4 @@ docker_compose_instance_directory: "{{path_docker_compose_instances}}mybb/"
|
||||
docker_compose_instance_confd_directory: "{{docker_compose_instance_directory}}conf.d/"
|
||||
docker_compose_instance_confd_defaultconf_file: "{{docker_compose_instance_confd_directory}}default.conf"
|
||||
target_mount_conf_d_directory: "/etc/nginx/conf.d/"
|
||||
source_domain: "mybb.{{top_domain}}"
|
||||
mybb_main_domain: "mybb.{{top_domain}}"
|
||||
|
@ -23,8 +23,7 @@ This Ansible role configures Nginx to perform 301 redirects from one domain to a
|
||||
```yaml
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: nginx-domain-redirect, domain_mappings: [ {source: 'example.com', target: 'newdomain.com'} ] }
|
||||
``````
|
||||
- { role: nginx-redirect, domain_mappings: [ {source: 'example.com', target: 'newdomain.com'} ] }
|
||||
|
||||
## Author Information
|
||||
This role was created in 2023 by Kevin Veen Birkenbach.
|
@ -1,33 +0,0 @@
|
||||
# Jrnl Role for Ansible
|
||||
|
||||
## Overview
|
||||
This role automates the installation of Jrnl, a simple and effective command-line journal application. It uses the `community.general.pacman` module for systems that support the Pacman package manager, ensuring that Jrnl is installed and up to date.
|
||||
|
||||
## Requirements
|
||||
- Ansible 2.9 or higher.
|
||||
- Access to Pacman package manager (commonly available on Arch Linux and derivatives).
|
||||
|
||||
## Role Variables
|
||||
No additional role variables are needed for this role as it solely focuses on the installation of Jrnl.
|
||||
|
||||
## Dependencies
|
||||
No external dependencies.
|
||||
|
||||
## Example Playbook
|
||||
Including this role in your playbook is straightforward. Simply add the role to your playbook's roles section:
|
||||
|
||||
```yaml
|
||||
- hosts: all
|
||||
roles:
|
||||
- pc-jrnl
|
||||
```
|
||||
|
||||
## Additional Information
|
||||
For more detailed information on Jrnl and its functionalities, visit [Jrnl's official documentation](https://jrnl.sh/).
|
||||
|
||||
## Contributing
|
||||
Contributions to this role are welcome. Please adhere to standard coding conventions and best practices.
|
||||
|
||||
## More Information
|
||||
|
||||
This role was created as part of a larger playbook. For more context on this role, you can refer to the related ChatGPT conversation [here](https://chat.openai.com/share/ae168ca0-5191-4bec-96a0-ffcfabca0024).
|
@ -1,5 +0,0 @@
|
||||
- name: install jrnl
|
||||
community.general.pacman:
|
||||
name:
|
||||
- jrnl
|
||||
state: present
|
Loading…
Reference in New Issue
Block a user