ansible/roles/vm/vars/vm.yml
2023-12-05 18:12:35 +01:00

136 lines
2.9 KiB
YAML

# 2023-12-05
# Settings: vm
---
#
# directories
#
vm_docker_root: "/opt/docker"
vm_include_folder: "_vm"
vm_template_root_vm: "{{ vm_docker_root }}/{{ vm_include_folder }}"
vm_template_scripts_root: "{{ vm_docker_root }}"
vm_docker_work: "/opt/work"
vm_docker_backups: "/opt/backups"
#
# templates
#
vm_template_hosts: hosts.j2
vm_template_hosts_distribution: "/etc/hosts"
vm_template_common: yaml_common.j2
vm_template_common_name: "common.yml"
vm_template_host: yaml_host.j2
vm_template_host_name: "host.yml"
vm_template_vpn: yaml_vpn.j2
vm_template_vpn_name: "vpn.yml"
vm_template_env: yaml_env.j2
vm_template_env_name: ".env"
vm_template_script_network: script_network.j2
vm_template_script_network_name: "networks"
vm_template_script_rights: script_rights.j2
vm_template_script_rights_name: "rights"
vm_template_script_stacks: script_stacks.j2
vm_template_script_stacks_name: "stacks"
#
# commons
#
vm_master_name: "omoikane"
vm_main_name: "raijin"
vm_uzume_name: "uzume"
vm_inari_name: "inari"
vm_sarutahiko_name: "sarutahiko"
#
# environnment
#
vm_timezone: "Europe/Paris"
vm_puid: "1000"
vm_pgid: "1000"
vm_stack_owner: "Olivier Le Bris"
vm_stack_email: "tech@zogg.fr"
vm_stack_website: "https://zogg.fr"
vm_puidx: "911"
vm_pgidx: "911"
#
# networks
#
vm_docker_traefik_network: "traefik"
vm_docker_socketproxy_network: "dockerproxy"
#
# machine ressources
#
vm_os_id: "{{ ansible_facts['lsb']['id'] }}"
vm_os_release: "{{ ansible_facts['lsb']['release'] }}"
vm_os_codename: "{{ ansible_facts['lsb']['codename'] }}"
vm_os_description: "{{ ansible_facts['lsb']['description'] }}"
vm_os_nproc: "{{ (ansible_facts['processor_nproc'] * 1.0) |int |abs |int |float }}"
vm_os_cpu_min: "{{ 1.0 |int |abs |int |float }}"
vm_os_cpu_max: "{{ vm_os_nproc |int |float }}"
vm_os_cpu_half: "{{ ((ansible_facts['processor_nproc'] * 1.0) / 2.0) |int |abs |int |float }}"
vm_os_memory_go: "{{ ((ansible_facts['memtotal_mb'] *1.0) /1024 |pow(1)) |round |int |float }}"
vm_os_memory_min: "64"
vm_os_memory_max: "{{ vm_os_memory_go |int |float }}"
#
# ressources limits
#
vm_resources_cpu: "1.0"
vm_resources_memory: "{{ vm_os_memory_min }}M"
vm_resources_pid: "64"
vm_resources_tmpfs: "{{ vm_os_memory_min }}M"
#
# stacks
#
vm_stack_excluded_template: "excluded_txt.j2"
vm_stack_excluded_template_name: "excluded.txt"
vm_stack_selector_template: "selector_template.j2"
vm_stack_available: "available.{{ vm_template_script_stacks_name }}"
vm_stack_before: "before.{{ vm_template_script_stacks_name }}"
vm_stack_current: "services.{{ vm_template_script_stacks_name }}"
vm_stack_after: "after.{{ vm_template_script_stacks_name }}"
vm_stack_stop: "stop.{{ vm_template_script_stacks_name }}"
vm_stack_unitary: "unitary.{{ vm_template_script_stacks_name }}"
vm_stack_logfilename: "{{ vm_template_script_stacks_name }}"
vm_stack_logfileext: "log"
vm_stack_logpath: "/var/log"
vm_stack_backup_header: "vm_"
vm_stack_backup_common: "_docker_stack_"