Aggiornato per supportare la nuova gestione della pausa pranzo.
This commit is contained in:
parent
ed301fb05e
commit
1178672916
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>ansible-role-epas-client-timbrature</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
10
README.md
10
README.md
|
@ -11,10 +11,7 @@ The most important variables are listed below:
|
||||||
``` yaml
|
``` yaml
|
||||||
epas_client_timbrature_stack_name: 'epas_c_timbrature'
|
epas_client_timbrature_stack_name: 'epas_c_timbrature'
|
||||||
epas_client_timbrature_service_name: 'epas_timbrature'
|
epas_client_timbrature_service_name: 'epas_timbrature'
|
||||||
epas_client_timbrature_docker_registry: 'docker-registry.services.iit.cnr.it'
|
epas_client_timbrature_docker_client_timbrature_image: 'consiglionazionalericerche/epas-client:area-cnr-pisa'
|
||||||
epas_client_timbrature_docker_registry_user: 'epas.user'
|
|
||||||
epas_client_timbrature_docker_registry_pwd: 'use a vault file'
|
|
||||||
epas_client_timbrature_docker_client_timbrature_image: '{{ epas_client_timbrature_docker_registry }}/epas/area-pisa-client:stable'
|
|
||||||
epas_client_timbrature_docker_client_timbrature_data_node: 'localhost'
|
epas_client_timbrature_docker_client_timbrature_data_node: 'localhost'
|
||||||
epas_client_timbrature_data_volume: 'epas_dati_timbrature'
|
epas_client_timbrature_data_volume: 'epas_dati_timbrature'
|
||||||
epas_client_timbrature_node_constraints: 'node.labels.epas_client == timbrature'
|
epas_client_timbrature_node_constraints: 'node.labels.epas_client == timbrature'
|
||||||
|
@ -22,6 +19,7 @@ epas_client_timbrature_behind_haproxy: False
|
||||||
epas_client_timbrature_haproxy_public_net: 'haproxy-public'
|
epas_client_timbrature_haproxy_public_net: 'haproxy-public'
|
||||||
epas_client_timbrature_compose_dir: '/srv/epas_client_timbrature'
|
epas_client_timbrature_compose_dir: '/srv/epas_client_timbrature'
|
||||||
|
|
||||||
|
epas_client_timbrature_stampings_server_protocol: 'ftp'
|
||||||
epas_client_timbrature_ftp_server_name: '127.0.0.1'
|
epas_client_timbrature_ftp_server_name: '127.0.0.1'
|
||||||
epas_client_timbrature_ftp_username: 'anonymous'
|
epas_client_timbrature_ftp_username: 'anonymous'
|
||||||
#epas_client_timbrature_ftp_pwd: 'use a vault file'
|
#epas_client_timbrature_ftp_pwd: 'use a vault file'
|
||||||
|
@ -33,6 +31,10 @@ epas_client_timbrature_epas_server_port: 443
|
||||||
epas_client_timbrature_user: 'user'
|
epas_client_timbrature_user: 'user'
|
||||||
#epas_client_timbrature_password: 'use a vault file'
|
#epas_client_timbrature_password: 'use a vault file'
|
||||||
epas_client_timbrature_loglevel: 'INFO'
|
epas_client_timbrature_loglevel: 'INFO'
|
||||||
|
epas_client_timbrature_fix_causale_pausa_pranzo: 'False'
|
||||||
|
epas_client_timbrature_causale_pausa_pranzo_min_hour: '12'
|
||||||
|
epas_client_timbrature_causale_pausa_pranzo_max_hour: '15'
|
||||||
|
epas_client_timbrature_send_all_stampings_everytime: 'True'
|
||||||
```
|
```
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
---
|
---
|
||||||
epas_client_timbrature_stack_name: 'epas_c_timbrature'
|
epas_client_timbrature_stack_name: 'epas_c_timbrature'
|
||||||
epas_client_timbrature_service_name: 'epas_timbrature'
|
epas_client_timbrature_service_name: 'epas_timbrature'
|
||||||
epas_client_timbrature_docker_registry: 'docker-registry.services.iit.cnr.it'
|
#epas_client_timbrature_docker_registry: 'docker-registry.services.iit.cnr.it'
|
||||||
epas_client_timbrature_docker_registry_user: 'epas.user'
|
#epas_client_timbrature_docker_registry_user: 'epas.user'
|
||||||
epas_client_timbrature_docker_registry_pwd: 'use a vault file'
|
#epas_client_timbrature_docker_registry_pwd: 'use a vault file'
|
||||||
epas_client_timbrature_docker_client_timbrature_image: '{{ epas_client_timbrature_docker_registry }}/epas/area-pisa-client:latest'
|
#epas_client_timbrature_docker_client_timbrature_image: '{{ epas_client_timbrature_docker_registry }}/epas/area-pisa-client:latest'
|
||||||
|
epas_client_timbrature_docker_registry: ''
|
||||||
|
epas_client_timbrature_docker_registry_user: ''
|
||||||
|
epas_client_timbrature_docker_registry_pwd: ''
|
||||||
|
epas_client_timbrature_docker_client_timbrature_image: 'consiglionazionalericerche/epas-client:area-cnr-pisa'
|
||||||
epas_client_timbrature_docker_client_timbrature_data_node: 'localhost'
|
epas_client_timbrature_docker_client_timbrature_data_node: 'localhost'
|
||||||
epas_client_timbrature_data_remote_volume: false
|
epas_client_timbrature_data_remote_volume: false
|
||||||
epas_client_timbrature_data_remote_volume_opts: "nfsvers=4,addr=127.0.0.1,rw"
|
epas_client_timbrature_data_remote_volume_opts: "nfsvers=4,addr=127.0.0.1,rw"
|
||||||
|
@ -15,6 +19,7 @@ epas_client_timbrature_behind_haproxy: False
|
||||||
epas_client_timbrature_haproxy_public_net: 'haproxy-public'
|
epas_client_timbrature_haproxy_public_net: 'haproxy-public'
|
||||||
epas_client_timbrature_compose_dir: '/srv/epas_client_timbrature'
|
epas_client_timbrature_compose_dir: '/srv/epas_client_timbrature'
|
||||||
|
|
||||||
|
epas_client_timbrature_stampings_server_protocol: 'ftp'
|
||||||
epas_client_timbrature_ftp_server_name: '127.0.0.1'
|
epas_client_timbrature_ftp_server_name: '127.0.0.1'
|
||||||
epas_client_timbrature_ftp_username: 'anonymous'
|
epas_client_timbrature_ftp_username: 'anonymous'
|
||||||
#epas_client_timbrature_ftp_pwd: 'use a vault file'
|
#epas_client_timbrature_ftp_pwd: 'use a vault file'
|
||||||
|
@ -26,3 +31,13 @@ epas_client_timbrature_epas_server_port: 443
|
||||||
epas_client_timbrature_user: 'user'
|
epas_client_timbrature_user: 'user'
|
||||||
#epas_client_timbrature_password: 'use a vault file'
|
#epas_client_timbrature_password: 'use a vault file'
|
||||||
epas_client_timbrature_loglevel: 'INFO'
|
epas_client_timbrature_loglevel: 'INFO'
|
||||||
|
epas_client_timbrature_regex_stamping: '^(?P<operazione>\\\d{2})(?P<lettore>\\\d{2})[!|\\\s](?P<causale>\\\d{4})\\\w(?P<matricolaFirma>[\\\w,\\\s,.]{17})(?P<anno>\\\d\\\d)(?P<mese>\\\d\\\d)(?P<giorno>\\\d\\\d)(?P<ora>\\\d\\\d)(?P<minuti>\\\d\\\d)$'
|
||||||
|
epas_client_timbrature_offset_anno_badge: '1980'
|
||||||
|
epas_client_timbrature_fix_causale_pausa_pranzo: 'False'
|
||||||
|
epas_client_timbrature_mapping_causali_client_server: '{"0000": None, "2345": None,"0001":"motiviDiServizio"}'
|
||||||
|
epas_client_timbrature_causale_pausa_pranzo_min_hour: '12'
|
||||||
|
epas_client_timbrature_causale_pausa_pranzo_max_hour: '15'
|
||||||
|
epas_client_timbrature_send_all_stampings_everytime: 'True'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,10 @@
|
||||||
- name: Install the docker compose file
|
- name: Install the docker compose file
|
||||||
template: src=epas-client-timbrature-docker-compose.yml.j2 dest={{ epas_client_timbrature_compose_dir }}/docker-epas-client-timbrature-stack.yml owner=root group=root mode='0400'
|
template: src=epas-client-timbrature-docker-compose.yml.j2 dest={{ epas_client_timbrature_compose_dir }}/docker-epas-client-timbrature-stack.yml owner=root group=root mode='0400'
|
||||||
|
|
||||||
- name: Login into the IIT registry
|
# If registry not is docker hub
|
||||||
shell: docker login -u {{ epas_client_timbrature_docker_registry_user }} -p {{ epas_client_timbrature_docker_registry_pwd }} {{ epas_client_timbrature_docker_registry }}
|
#
|
||||||
|
#- name: Login into the IIT registry
|
||||||
|
# shell: docker login -u {{ epas_client_timbrature_docker_registry_user }} -p {{ epas_client_timbrature_docker_registry_pwd }} {{ epas_client_timbrature_docker_registry }}
|
||||||
|
|
||||||
- name: Start the ePAS stack
|
- name: Start the ePAS stack
|
||||||
docker_stack:
|
docker_stack:
|
||||||
|
|
|
@ -29,6 +29,7 @@ services:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
environment:
|
environment:
|
||||||
|
- STAMPINGS_SERVER_PROTOCOL={{ epas_client_timbrature_stampings_server_protocol }} # Protocollo per prelevare le timbrature. Possibili valori: smartclock, local, ftp, sftp
|
||||||
- FTP_SERVER_NAME={{ epas_client_timbrature_ftp_server_name }} # Obbligatorio
|
- FTP_SERVER_NAME={{ epas_client_timbrature_ftp_server_name }} # Obbligatorio
|
||||||
- FTP_USERNAME={{ epas_client_timbrature_ftp_username }} # Obbligatorio
|
- FTP_USERNAME={{ epas_client_timbrature_ftp_username }} # Obbligatorio
|
||||||
- FTP_PASSWORD={{ epas_client_timbrature_ftp_pwd }} # Obbligatorio
|
- FTP_PASSWORD={{ epas_client_timbrature_ftp_pwd }} # Obbligatorio
|
||||||
|
@ -40,6 +41,13 @@ services:
|
||||||
- EPAS_CLIENT_USER={{ epas_client_timbrature_user }} # utente configurato in epas dentro sorgenti timbrature
|
- EPAS_CLIENT_USER={{ epas_client_timbrature_user }} # utente configurato in epas dentro sorgenti timbrature
|
||||||
- EPAS_CLIENT_PASSWORD={{ epas_client_timbrature_password }}
|
- EPAS_CLIENT_PASSWORD={{ epas_client_timbrature_password }}
|
||||||
- LOG_LEVEL={{ epas_client_timbrature_loglevel }} # Default: INFO
|
- LOG_LEVEL={{ epas_client_timbrature_loglevel }} # Default: INFO
|
||||||
|
- REGEX_STAMPING={{ epas_client_timbrature_regex_stamping }}
|
||||||
|
- OFFSET_ANNO_BADGE={{ epas_client_timbrature_offset_anno_badge }} # Default: 2000
|
||||||
|
- FIX_CAUSALE_PAUSA_PRANZO={{ epas_client_timbrature_fix_causale_pausa_pranzo}} # Default: False
|
||||||
|
- MAPPING_CAUSALI_CLIENT_SERVER={{ epas_client_timbrature_mapping_causali_client_server }} # Default: {'0000': None, '0001': 'motiviDiServizio', '0007': 'pausaPranzo'}
|
||||||
|
- CAUSALE_PAUSA_PRANZO_MIN_HOUR={{ epas_client_timbrature_causale_pausa_pranzo_min_hour }} # Default: 12
|
||||||
|
- CAUSALE_PAUSA_PRANZO_MAX_HOUR={{ epas_client_timbrature_causale_pausa_pranzo_max_hour }} # Default: 15
|
||||||
|
- SEND_ALL_STAMPINGS_EVERYTIME={{ epas_client_timbrature_send_all_stampings_everytime }}
|
||||||
#- CRON=*/30 7-22 * * * # Default: ogni mezz'ora tra le 7 e le 22. utilizzare il formato richiesto dal crontab. Riferimenti -> https://en.wikipedia.org/wiki/Cron#Examples
|
#- CRON=*/30 7-22 * * * # Default: ogni mezz'ora tra le 7 e le 22. utilizzare il formato richiesto dal crontab. Riferimenti -> https://en.wikipedia.org/wiki/Cron#Examples
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
|
|
Loading…
Reference in New Issue