google_spell_pspell: Initial version of role
This commit is contained in:
parent
f08c478bf6
commit
80b7a7c97f
5 changed files with 105 additions and 11 deletions
54
roles/google_spell_pspell/tasks/main.yml
Normal file
54
roles/google_spell_pspell/tasks/main.yml
Normal file
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
- name: Create group
|
||||
ansible.builtin.group:
|
||||
name: pspell
|
||||
|
||||
- name: Create user
|
||||
ansible.builtin.user:
|
||||
name: pspell
|
||||
comment: Podman google-spell-pspell
|
||||
group: pspell
|
||||
shell: /sbin/nologin
|
||||
|
||||
- name: Enable user lingering
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- loginctl
|
||||
- enable-linger
|
||||
- pspell
|
||||
creates: /var/lib/systemd/linger/pspell
|
||||
|
||||
- name: Get container source
|
||||
ansible.builtin.git:
|
||||
dest: /usr/local/src/docker-google-spell-pspell
|
||||
repo: https://github.com/foo-sh/docker-google-spell-pspell.git
|
||||
update: true
|
||||
version: main
|
||||
notify: Rebuild google-spell-pspell-container
|
||||
|
||||
- name: Create service file
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/systemd/system/google-spell-pspell-container.service
|
||||
src: google-spell-pspell-container.service
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart google-spell-pspell-container
|
||||
|
||||
- name: Enable service
|
||||
ansible.builtin.service:
|
||||
name: google-spell-pspell-container
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Copy nginx config
|
||||
ansible.builtin.copy:
|
||||
dest: "/etc/nginx/conf.d/{{ inventory_hostname }}/google-spell-pspell.conf"
|
||||
content: |
|
||||
location /tbproxy/spell {
|
||||
proxy_pass http://127.0.0.1:8010/;
|
||||
}
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart nginx
|
Loading…
Add table
Add a link
Reference in a new issue