Compare commits
32 Commits
change-fol
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 236b4cf428 | |||
| 1cea2385da | |||
| ecdd27630f | |||
| 15317c42e0 | |||
| e3ae7c2fff | |||
| 3a6bd84322 | |||
| 84d3f8ab1f | |||
| d8766e9dcd | |||
| a4e4f2e523 | |||
| 9f9a1c65ee | |||
| 1e85b40716 | |||
| 4b5d9244bf | |||
| 8429f321e4 | |||
| 4168606904 | |||
| 91f7694ba7 | |||
| 80fb749189 | |||
| 802b9bf676 | |||
| ec03f1f3f7 | |||
| 0057817c70 | |||
| f6e9be496b | |||
| f217fd56d0 | |||
| 47c54df9df | |||
| d7483be456 | |||
| f488c825df | |||
| 9da2cc36e7 | |||
| 7e5ad9cd89 | |||
| 24049338ef | |||
| bda1d5f1da | |||
| 920dad4423 | |||
| c2268d642d | |||
| 88b9e46f26 | |||
| e0581fb2ae |
14
README.md
14
README.md
@ -19,8 +19,8 @@ config:
|
|||||||
permissions: '0600'
|
permissions: '0600'
|
||||||
content: !!binary |
|
content: !!binary |
|
||||||
H4sICCW ... 🔒 gzipped and base64-encoded private key, registered as
|
H4sICCW ... 🔒 gzipped and base64-encoded private key, registered as
|
||||||
deploy key in Gitea, in both the odoo_running_code and
|
deploy key in Gitea, in both the odoo14_running_code and
|
||||||
ansible-role-odoo8container repos. ... AAA==
|
ansible-role-odoo14 repos. ... AAA==
|
||||||
- encoding: gzip
|
- encoding: gzip
|
||||||
owner: root:root
|
owner: root:root
|
||||||
path: /root/.ssh/id_ed25519.pub
|
path: /root/.ssh/id_ed25519.pub
|
||||||
@ -34,6 +34,14 @@ config:
|
|||||||
content: !!binary |
|
content: !!binary |
|
||||||
H4sICPS ... 🔒 gzipped and base64-encoded host key for gitea ... AAA==
|
H4sICPS ... 🔒 gzipped and base64-encoded host key for gitea ... AAA==
|
||||||
runcmd:
|
runcmd:
|
||||||
- [ ansible-pull, -U, "ssh://git@gitea.agofer.net:22001/jegomez/ansible-role-odoo14-lxd.git" ]
|
- [ ansible-pull, -U, "ssh://git@gitea.agofer.net:22001/jegomez/ansible-role-odoo14.git" ]
|
||||||
description: LXD profile for Odoo 14
|
description: LXD profile for Odoo 14
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Healthchecks integration
|
||||||
|
|
||||||
|
<img src="https://check.agofer.net/badge/877dc356-7dcc-4997-bc28-cb684ba358a0/rJvkR6XH/restore.svg">
|
||||||
|
|
||||||
|
The role _pings_ our **Healthchecks** server, as proof of a successful
|
||||||
|
database restore.
|
||||||
|
|
||||||
|
|||||||
16
local.yml
16
local.yml
@ -1,7 +1,23 @@
|
|||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
|
pre_tasks:
|
||||||
|
|
||||||
|
- name: Register the start of the restore with Healthchecks server
|
||||||
|
uri:
|
||||||
|
url: '{{ postgresqlrestore_check_url }}/start'
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- odoo
|
- odoo
|
||||||
|
|
||||||
|
post_tasks:
|
||||||
|
|
||||||
|
- name: Register a successful restore with Healthchecks server
|
||||||
|
uri:
|
||||||
|
url: '{{ postgresqlrestore_check_url }}'
|
||||||
|
method: POST
|
||||||
|
body: '{{ ansible_hostname }}.{{ dominio }}'
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
dominio: agofer.net
|
dominio: agofer.net
|
||||||
|
|||||||
@ -15,3 +15,11 @@
|
|||||||
db: agofer
|
db: agofer
|
||||||
path_to_script: /home/odoo/change-odoo-settings.sql
|
path_to_script: /home/odoo/change-odoo-settings.sql
|
||||||
|
|
||||||
|
# Warning: path_to_script is deprecated; switch to postgresql_script:
|
||||||
|
# - name: Run a script directly on the database
|
||||||
|
# become: true
|
||||||
|
# become_user: postgres
|
||||||
|
# postgresql_script:
|
||||||
|
# login_db: agofer
|
||||||
|
# path: /home/odoo/change-odoo-settings.sql
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,6 @@
|
|||||||
owner: odoo
|
owner: odoo
|
||||||
loop:
|
loop:
|
||||||
- /var/log/odoo
|
- /var/log/odoo
|
||||||
- /opt/odoo
|
|
||||||
- /home/odoo/.local/share/Odoo/filestore/agofer
|
- /home/odoo/.local/share/Odoo/filestore/agofer
|
||||||
- /home/odoo/src
|
- /home/odoo/src
|
||||||
- /etc/odoo
|
- /etc/odoo
|
||||||
@ -39,12 +38,10 @@
|
|||||||
pip:
|
pip:
|
||||||
virtualenv: /home/odoo/.venv/odoo
|
virtualenv: /home/odoo/.venv/odoo
|
||||||
virtualenv_command: python3.8 -m venv
|
virtualenv_command: python3.8 -m venv
|
||||||
requirements: /opt/odoo/core/requirements.txt
|
requirements: '{{ item }}'
|
||||||
|
loop:
|
||||||
# Possible errors in gevent module with Ubuntu 20.04
|
- /opt/odoo/core/requirements.txt
|
||||||
# (chat, stars, don't update interactively on screen)
|
- /opt/odoo/vendor/requirements.txt
|
||||||
# $ pip install --upgrade gevent
|
|
||||||
# Successfully installed gevent-20.9.0 greenlet-0.4.17 ...
|
|
||||||
|
|
||||||
- name: Download and install wkhtmltopdf
|
- name: Download and install wkhtmltopdf
|
||||||
apt:
|
apt:
|
||||||
|
|||||||
@ -14,7 +14,6 @@
|
|||||||
- name: Retrieve database backup
|
- name: Retrieve database backup
|
||||||
synchronize:
|
synchronize:
|
||||||
mode: pull
|
mode: pull
|
||||||
compress: no
|
|
||||||
src: '{{ database_location }}'
|
src: '{{ database_location }}'
|
||||||
dest: /home/odoo/db_odoo_agofer.sql.gz
|
dest: /home/odoo/db_odoo_agofer.sql.gz
|
||||||
|
|
||||||
|
|||||||
@ -1,49 +1,31 @@
|
|||||||
-- Update Odoo database with new settings for the current development/testing
|
-- Update Odoo database with dev/testing settings
|
||||||
-- install
|
|
||||||
|
|
||||||
-- Change Electronic Invoice settings to prevent invoices from being sent
|
-- Change Electronic Invoice settings to prevent invoices from being sent
|
||||||
|
|
||||||
UPDATE "res_company" SET "ei_automatic_gen"=false,"ei_ack_folder"='/INVOICE/LAB/800216499/800216499_01/OUT/Acuse_Recibo/',"ei_dian_result_folder"='/INVOICE/LAB/800216499/800216499_01/OUT/Dian_result',"ei_write_folder"='/INVOICE/LAB/800216499/800216499_01/IN/',"ei_automatic_read"=false,"ei_error_folder"='/INVOICE/LAB/800216499/800216499_01/OUT/Error/',"ei_decision_folder"='/INVOICE/LAB/800216499/800216499_01/OUT/Aceptacion_y_rechazo/',"ei_server_type"='test',"xml_automatic_generation"=false,"sftp_url"='fecolab.cen.biz',"ei_voucher_folder"='/INVOICE/LAB/800216499/800216499_01/OUT/Comprobantes/' WHERE id IN (1);
|
UPDATE "res_company" SET "einvoicing_enabled"=false,"ei_environment"='test',"edi_ds_ambient"='2' WHERE id = 1;
|
||||||
|
|
||||||
-- Deactivate Electronic Invoice periodic checks and downloads
|
-- Deactivate Electronic Invoice periodic checks and downloads
|
||||||
|
|
||||||
UPDATE "ir_cron" SET "active"=false WHERE id IN (25);
|
UPDATE "ir_cron" SET "active"=false WHERE id IN (25, 27);
|
||||||
|
|
||||||
UPDATE "ir_cron" SET "active"=false WHERE id IN (27);
|
|
||||||
|
|
||||||
-- Change Client ID for Google OAuth authentication
|
-- Change Client ID for Google OAuth authentication
|
||||||
|
|
||||||
UPDATE "auth_oauth_provider" SET "client_id"='839348907645-51gmj31708h2vuts2sorqh842uhohoce.apps.googleusercontent.com' WHERE id IN (3);
|
UPDATE "auth_oauth_provider" SET "client_id"='839348907645-51gmj31708h2vuts2sorqh842uhohoce.apps.googleusercontent.com' WHERE id = 3;
|
||||||
|
{#
|
||||||
|
-- Change password for user 'admin'
|
||||||
|
|
||||||
-- Change password for user 'sistemas'
|
UPDATE "res_users" SET "password_crypt"='$pbkdf2-sha512$6400$tnYOAUCoNSbkHKMUAmAMgQ$UTwtQj2mGD1KnW5.S7dq0qxMw5M4tuWb2ckr8vB8k7MLrwG5aDyWDA6sLXawE..xrLDjvYrtxgIRvNf97knYVQ' WHERE id = 2;
|
||||||
|
|
||||||
UPDATE "res_users" SET "password_crypt"='$pbkdf2-sha512$6400$tnYOAUCoNSbkHKMUAmAMgQ$UTwtQj2mGD1KnW5.S7dq0qxMw5M4tuWb2ckr8vB8k7MLrwG5aDyWDA6sLXawE..xrLDjvYrtxgIRvNf97knYVQ' WHERE id IN (5);
|
UPDATE "res_users" SET "password"='' WHERE id = 2;
|
||||||
|
|
||||||
UPDATE "res_users" SET "password"='' WHERE id = 5;
|
UPDATE "res_users" SET "share"=false WHERE id = 2;
|
||||||
|
#}
|
||||||
|
-- Delete incoming and change outgoing mail servers
|
||||||
|
|
||||||
UPDATE "res_users" SET "share"=false WHERE id = 5;
|
DELETE FROM fetchmail_server where id = 1;
|
||||||
|
|
||||||
-- Delete incoming and outgoing mail server settings
|
UPDATE "ir_mail_server" SET "name"='Mailpit',"smtp_host"='mailtest.agofer.net',"active"=true where id = 1;
|
||||||
|
|
||||||
DELETE FROM wkf_instance where res_id=1 and res_type='fetchmail.server';
|
|
||||||
|
|
||||||
DELETE FROM fetchmail_server where id IN (1);
|
|
||||||
|
|
||||||
DELETE FROM wkf_instance where res_id=1 and res_type='ir.mail_server';
|
|
||||||
|
|
||||||
DELETE FROM ir_mail_server where id IN (1);
|
|
||||||
|
|
||||||
DELETE FROM wkf_instance where res_id=4 and res_type='ir.mail_server';
|
|
||||||
|
|
||||||
DELETE FROM ir_mail_server where id IN (4);
|
|
||||||
|
|
||||||
DELETE FROM wkf_instance where res_id=5 and res_type='ir.mail_server';
|
|
||||||
|
|
||||||
DELETE FROM ir_mail_server where id IN (5);
|
|
||||||
|
|
||||||
DELETE FROM ir_model_data where id IN (1576);
|
|
||||||
|
|
||||||
-- Change base URL
|
-- Change base URL
|
||||||
|
|
||||||
UPDATE "ir_config_parameter" SET "value"='https://{{ ansible_hostname }}.{{ dominio }}' WHERE id IN (5);
|
UPDATE "ir_config_parameter" SET "value"='https://{{ ansible_hostname }}.{{ dominio }}' WHERE id = 4;
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ db_user = odoo
|
|||||||
db_name = agofer
|
db_name = agofer
|
||||||
list_db = True
|
list_db = True
|
||||||
dbfilter = ^agofer$
|
dbfilter = ^agofer$
|
||||||
addons_path = /opt/odoo/core/addons,/opt/odoo/community,/opt/odoo/custom,/opt/odoo/vendor
|
addons_path = /opt/odoo/core/addons,/opt/odoo/community,/opt/odoo/apps,/opt/odoo/vendor,/opt/odoo/vendor01,/opt/odoo/custom
|
||||||
without_demo = all
|
without_demo = all
|
||||||
test_enable = False
|
test_enable = False
|
||||||
timezone = America/Bogota
|
timezone = America/Bogota
|
||||||
@ -38,10 +38,8 @@ limit-memory-hard = 9395240960
|
|||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Acceso
|
# Acceso
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
proxy_mode = True
|
http_interface = 127.0.0.1
|
||||||
xmlrpcs = False
|
http_port = 8090
|
||||||
longpolling_port = 8082
|
longpolling_port = 8082
|
||||||
xmlrpc_port = 8090
|
proxy_mode = True
|
||||||
xmlrpc_interface = 127.0.0.1
|
server_wide_modules = web,l10n_co_account_e_invoicing,bi_sql_editor
|
||||||
netrpc_interface = 127.0.0.1
|
|
||||||
|
|
||||||
@ -6,7 +6,9 @@ wkhtmltopdf_location: 'https://github.com/wkhtmltopdf/wkhtmltopdf/releases/downl
|
|||||||
|
|
||||||
sourcecode_location: 'ssh://git@gitea.agofer.net:22001/Agofer/odoo14_running_code.git'
|
sourcecode_location: 'ssh://git@gitea.agofer.net:22001/Agofer/odoo14_running_code.git'
|
||||||
|
|
||||||
database_location: 'rsync://backups.bogota.agofer/db14/db_odoo_agofer.gz'
|
database_location: 'rsync://servidor6cbe.dmz.agofer/db14/db_odoo_agofer.gz'
|
||||||
|
|
||||||
|
postgresqlrestore_check_url: 'https://check.agofer.net/ping/cf93353e-9601-4b62-8020-711a1913a505'
|
||||||
|
|
||||||
apt_packages:
|
apt_packages:
|
||||||
- build-essential
|
- build-essential
|
||||||
@ -47,4 +49,18 @@ python_packages:
|
|||||||
- setuptools
|
- setuptools
|
||||||
- wheel
|
- wheel
|
||||||
- paramiko
|
- paramiko
|
||||||
- pdfminer
|
- pdfminer.six
|
||||||
|
- unidecode
|
||||||
|
- python-telegram-bot==13.15
|
||||||
|
- numpy
|
||||||
|
- geopy
|
||||||
|
- cerberus
|
||||||
|
- pyquerystring
|
||||||
|
- parse-accept-language
|
||||||
|
- apispec
|
||||||
|
- cachetools
|
||||||
|
- pandas==1.3.5
|
||||||
|
- python-magic
|
||||||
|
- holidays_co
|
||||||
|
- openupgradelib
|
||||||
|
- xmltodict
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user