forked from davestephens/ansible-nas
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -530,6 +530,10 @@ | |
tags: | ||
- openldap | ||
|
||
- role: open-resume | ||
tags: | ||
- openresume | ||
|
||
- role: organizr | ||
tags: | ||
- organizr | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
openresume_enabled: false | ||
openresume_available_externally: false | ||
|
||
# directories | ||
openresume_data_directory: "{{ docker_home }}/openresume" | ||
|
||
# network | ||
openresume_port: "3017" | ||
openresume_hostname: "openresume" | ||
|
||
# specs | ||
openresume_memory: 1g | ||
|
||
# docker | ||
openresume_container_name: openresume | ||
openresume_image_name: zottelchen/open-resume | ||
openresume_image_version: latest | ||
openresume_user_id: "1000" | ||
openresume_group_id: "1000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Open-resume | ||
|
||
Homepage: [https://github.com/xitanggg/open-resume](https://github.com/xitanggg/open-resume) | ||
|
||
OpenResume is a powerful open-source resume builder and resume parser. | ||
|
||
## Usage | ||
|
||
Set `openresume_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file. | ||
|
||
Open-resume web interface can be found at [http://ansible_nas_host_or_ip:3017](http://ansible_nas_host_or_ip:3017). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
provisioner: | ||
inventory: | ||
group_vars: | ||
all: | ||
openresume_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Stop | ||
hosts: all | ||
become: true | ||
tasks: | ||
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role" | ||
ansible.builtin.include_role: | ||
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" | ||
vars: | ||
openresume_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: Include vars | ||
ansible.builtin.include_vars: | ||
file: ../../defaults/main.yml | ||
|
||
- name: Get openresume container state | ||
community.docker.docker_container: | ||
name: "{{ openresume_container_name }}" | ||
register: result | ||
|
||
- name: Check if openresume containers are running | ||
ansible.builtin.assert: | ||
that: | ||
- result.container['State']['Status'] == "running" | ||
- result.container['State']['Restarting'] == false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: Include vars | ||
ansible.builtin.include_vars: | ||
file: ../../defaults/main.yml | ||
|
||
- name: Try and stop and remove openresume | ||
community.docker.docker_container: | ||
name: "{{ openresume_container_name }}" | ||
state: absent | ||
register: result | ||
|
||
- name: Check if openresume is stopped | ||
ansible.builtin.assert: | ||
that: | ||
- not result.changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../requirements.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
- name: Start Open-resume | ||
block: | ||
- name: Create Open-resume Directories | ||
ansible.builtin.file: | ||
path: "{{ item }}" | ||
state: directory | ||
with_items: | ||
- "{{ openresume_data_directory }}" | ||
|
||
- name: Create Open-resume Docker Container | ||
community.docker.docker_container: | ||
container_default_behavior: no_defaults | ||
name: "{{ openresume_container_name }}" | ||
image: "{{ openresume_image_name }}:{{ openresume_image_version }}" | ||
pull: true | ||
volumes: | ||
- "{{ openresume_data_directory }}/data:/data:rw" | ||
ports: | ||
- "{{ openresume_port }}:3000" | ||
env: | ||
TZ: "{{ ansible_nas_timezone }}" | ||
PUID: "{{ openresume_user_id | quote }}" | ||
PGID: "{{ openresume_group_id | quote }}" | ||
restart_policy: unless-stopped | ||
memory: "{{ openresume_memory }}" | ||
labels: | ||
traefik.enable: "{{ openresume_available_externally | string }}" | ||
traefik.http.routers.openresume.rule: "Host(`{{ openresume_hostname }}.{{ ansible_nas_domain }}`)" | ||
traefik.http.routers.openresume.tls.certresolver: "letsencrypt" | ||
traefik.http.routers.openresume.tls.domains[0].main: "{{ ansible_nas_domain }}" | ||
traefik.http.routers.openresume.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" | ||
traefik.http.services.openresume.loadbalancer.server.port: "3000" | ||
when: openresume_enabled is true | ||
|
||
- name: Stop Open-resume | ||
block: | ||
- name: Stop Open-resume | ||
community.docker.docker_container: | ||
name: "{{ openresume_container_name }}" | ||
state: absent | ||
when: openresume_enabled is false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: "Open-resume" | ||
description: "A powerful open-source resume builder and resume parser" | ||
--- | ||
|
||
Homepage: [https://github.com/xitanggg/open-resume](https://github.com/xitanggg/open-resume) | ||
|
||
OpenResume is a powerful open-source resume builder and resume parser. | ||
|
||
## Usage | ||
|
||
Set `openresume_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file. | ||
|
||
Open-resume web interface can be found at [http://ansible_nas_host_or_ip:3017](http://ansible_nas_host_or_ip:3017). |