making it functional when you have a minimal host

This commit is contained in:
Muhammed Hussein Karimi 2022-04-04 06:16:59 +04:30
parent c25b4cf9c8
commit 2e7231edd1
5 changed files with 37 additions and 7 deletions

View file

@ -3,16 +3,17 @@
vars: vars:
pip_install_packages: pip_install_packages:
- name: wheel
- name: pip
state: latest
- name: setuptools
- name: cffi
- name: docker - name: docker
- name: dockerpty
docker_compose_version: "v2.0.1" docker_compose_version: "v2.0.1"
tasks:
- name: Ensure {{inventory_hostname}} is set as hostname
hostname:
name: "{{inventory_hostname}}"
tags: ["hostname"]
roles: roles:
- {role: requirements, tags: ["docker", "requirements"]}
- {role: geerlingguy.docker, tags: ["docker"]} - {role: geerlingguy.docker, tags: ["docker"]}
- {role: geerlingguy.pip, tags: ["docker"]} - {role: geerlingguy.pip, tags: ["docker"]}
- {role: nginx, tags: ["nginx"]} - {role: nginx, tags: ["nginx"]}

View file

@ -77,7 +77,7 @@ http {
# location ~ (?<no_slash>.+)/$ { # location ~ (?<no_slash>.+)/$ {
# return 302 https://$host$no_slash; # return 302 https://$host$no_slash;
# } # }
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://uptime-kuma:3001/; proxy_pass http://uptime-kuma:3001/;
proxy_http_version 1.1; proxy_http_version 1.1;

View file

@ -0,0 +1,11 @@
---
- name: Ensure {{inventory_hostname}} is set as hostname
hostname:
name: "{{inventory_hostname}}"
tags: ["hostname"]
- include_tasks: setup-RedHat.yml
when: ansible_os_family == 'RedHat'
- include_tasks: setup-Debian.yml
when: ansible_os_family == 'Debian'

View file

@ -0,0 +1,9 @@
- name: Ensure packages for some requirements are installed
apt:
pkg:
- libffi-dev
- libzbar-dev
- libzbar0
- python3-docopt
update_cache: yes
state: present

View file

@ -0,0 +1,9 @@
- name: Ensure packages for some requirements are installed
dnf:
name:
- libffi-devel
- zbar-devel
- zbar
- python3-docopt
update_cache: yes
state: present