Fügt neues Environment für Instanz allinonept hinzu
							parent
							
								
									a602a65275
								
							
						
					
					
						commit
						7b0e135f9a
					
				|  | @ -0,0 +1,5 @@ | ||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | PORT=9002 | ||||||
|  | echo "Zugriff: http://localhost:$PORT" | ||||||
|  | ssh -p 3336 odoo-prod@5.9.67.35 -L $PORT:localhost:8069 | ||||||
|  | @ -0,0 +1,88 @@ | ||||||
|  | # -*- coding: utf-8 -*- | ||||||
|  | 
 | ||||||
|  | from .config import Config | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class ConfigAllInOnePT(Config): | ||||||
|  |     def __init__(self): | ||||||
|  |         super(ConfigAllInOnePT, self).__init__() | ||||||
|  | 
 | ||||||
|  |         self.company_xmlid = 'dp_custom.glaser_and_co_company' | ||||||
|  | 
 | ||||||
|  |         self.company_data = { | ||||||
|  |             'name': 'TZ Technik Solution GesmbH', | ||||||
|  |             'street': 'Althöflein 9/2', | ||||||
|  |             'street2': False, | ||||||
|  |             'city': 'Großkrut', | ||||||
|  |             'zip': '2143', | ||||||
|  |             'phone': False, | ||||||
|  |             'email': False, | ||||||
|  |             'website': False, | ||||||
|  |             'company_registry': False, | ||||||
|  |             'country_id': 'at',  # 'de' für Deutschland | ||||||
|  |             'vat': False, | ||||||
|  |             'vat_check_vies': True, | ||||||
|  |             'logo': '../ext/custom-addons/dp_custom/static/src/img/logo.png', | ||||||
|  |             #'favicon_backend': '../ext/custom-addons/dp_custom/static/src/img/favicon.ico', | ||||||
|  |             #'favicon_backend_mimetype': 'image/x-icon' | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         # Nur für Lager | ||||||
|  |         # Wenn nicht gesetzt, dann wird der Firmenname genommen | ||||||
|  |         self.warehouse_name = 'TZ Technik' | ||||||
|  |         self.warehouse_code = 'TZ Technik' | ||||||
|  | 
 | ||||||
|  |         self.tax_settings = { | ||||||
|  |             'default_sale_tax_id': self.default_sales_tax | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         self.sequences = { | ||||||
|  |             'sale.order': { | ||||||
|  |                 # 'number_next_actual': 1, | ||||||
|  |                 'prefix': 'ATOF%(range_y)s-', | ||||||
|  |                 'padding': 6, | ||||||
|  |                 'use_date_range': True, | ||||||
|  |                 'monthly_date_range': False | ||||||
|  |             }, | ||||||
|  |             'account.invoice': { | ||||||
|  |                 # 'number_next_actual': 0001, | ||||||
|  |                 'prefix': '%(range_year)s-', | ||||||
|  |                 'padding': 6, | ||||||
|  |                 'use_date_range': True, | ||||||
|  |             }, | ||||||
|  |             # Wenn 'account.invoice_refund' auskommentiert ist, dann wird | ||||||
|  |             # für die Gutschrift der selbe Nummernkreis verwendet | ||||||
|  |             # 'account.invoice_refund': { | ||||||
|  |             #     # 'number_next_actual': 0001, | ||||||
|  |             #     'name': 'Gutschriften', | ||||||
|  |             #     'implementation': 'no_gap', | ||||||
|  |             #     'prefix': 'GL%(y)s', | ||||||
|  |             #     'padding': 4, | ||||||
|  |             #     'use_date_range': True, | ||||||
|  |             #     'monthly_date_range': False | ||||||
|  |             # }, | ||||||
|  |             # 'picking.out': { | ||||||
|  |             #    # 'number_next_actual': 1, | ||||||
|  |             #    'prefix': 'LS-', | ||||||
|  |             #    'padding': 5, | ||||||
|  |             # }, | ||||||
|  |             #            'picking.in':  { | ||||||
|  |             #                #'number_next_actual': 1, | ||||||
|  |             #                'prefix': 'LS/IN/', | ||||||
|  |             #                'padding': 4, | ||||||
|  |             #            }, | ||||||
|  |             #            'picking.int':  { | ||||||
|  |             #                #'number_next_actual': 1, | ||||||
|  |             #                'prefix': 'LS/INT/', | ||||||
|  |             #                'padding': 4, | ||||||
|  |             #            }, | ||||||
|  |             #             'purchase.order':  { | ||||||
|  |             #                 'number_next_actual': 1, | ||||||
|  |             #                 'prefix': 'B-', | ||||||
|  |             #                 'padding': 5, | ||||||
|  |             #             }, | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         self.multi_company_settings = { | ||||||
|  |             'chart_template_id': ('xmlid', 'l10n_at.austria_chart_template') | ||||||
|  |         } | ||||||
|  | @ -2,6 +2,7 @@ | ||||||
| 
 | 
 | ||||||
| from .config_tza import ConfigTZA | from .config_tza import ConfigTZA | ||||||
| from .config_glaser import ConfigGlaser | from .config_glaser import ConfigGlaser | ||||||
|  | from .config_allinonept import ConfigAllInOnePT | ||||||
| 
 | 
 | ||||||
| class Environment(): | class Environment(): | ||||||
|     def __init__(self, host, port, dbname, username, pwd=None, super_admin_pw=None, demo=False, config=False): |     def __init__(self, host, port, dbname, username, pwd=None, super_admin_pw=None, demo=False, config=False): | ||||||
|  | @ -66,4 +67,6 @@ ENVIRONMENTS = { | ||||||
| 
 | 
 | ||||||
|     'prod': Environment('http://localhost', '9002', 'odoo-prod', 'admin', config = ConfigTZA()), |     'prod': Environment('http://localhost', '9002', 'odoo-prod', 'admin', config = ConfigTZA()), | ||||||
|     'prod-glaser': Environment('http://localhost',  '9002', 'odoo-prod', 'glaser-admin', config = ConfigGlaser()), |     'prod-glaser': Environment('http://localhost',  '9002', 'odoo-prod', 'glaser-admin', config = ConfigGlaser()), | ||||||
|  | 
 | ||||||
|  |     'allinonept': Environment('http://localhost', '9002', 'allinonept', 'admin', config=ConfigAllInOnePT()), | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| [local] | [local] | ||||||
| localhost ansible_connection=local | localhost ansible_connection=local | ||||||
| 
 | 
 | ||||||
| [tzaustria] | [tzaustria_allinonept] | ||||||
| 5.9.67.35:3333 ansible_connection=ssh ansible_user=datenpol | 5.9.67.35:3336 ansible_connection=ssh ansible_user=datenpol | ||||||
|  |  | ||||||
|  | @ -0,0 +1,36 @@ | ||||||
|  | --- | ||||||
|  | # This playbook deploys the whole application stack in this site. | ||||||
|  | 
 | ||||||
|  | - name: Odoo Prod | ||||||
|  |   hosts: tzaustria_allinonept | ||||||
|  |   become: yes | ||||||
|  |   # deactivate gather_facts when python is not installed on server | ||||||
|  |   # gather_facts: false | ||||||
|  |   # pre_tasks: | ||||||
|  |   #  - raw: which python || apt-get update | ||||||
|  |   #  - raw: (which python && which aptitude) || apt-get install -y python python-apt aptitude | ||||||
|  |   #  - setup: # aka gather_facts | ||||||
|  |   roles: | ||||||
|  |     - role: odoo | ||||||
|  |       odoo_repo_rev: master | ||||||
|  |       odoo_user: odoo-prod | ||||||
|  |       odoo_service: odoo-prod | ||||||
|  |       odoo_version: 11.0 | ||||||
|  |       odoo_config_http_port: 8069 | ||||||
|  |       odoo_config_admin_passwd: ainbeyos | ||||||
|  |       odoo_config_db_passwd: aroneyna | ||||||
|  |       odoo_general_user_passwd: elewcaph | ||||||
|  |       odoo_instance: "prod" | ||||||
|  |       odoo_config_dbfilter: "^{{ odoo_instance }}_.*" | ||||||
|  |       # remove the following paramters to install odoo from github | ||||||
|  |       odoo_repo_url: "ssh://git@gitlab.datenpol.at:122/odoo/tz-austria.git" | ||||||
|  |       odoo_config_addons_path:    | ||||||
|  |         - "/data/{{ odoo_user }}/odoo/ext/odoo/odoo/addons" | ||||||
|  |         - "/data/{{ odoo_user }}/odoo/ext/odoo/addons" | ||||||
|  |         - "/data/{{ odoo_user }}/odoo/ext/custom-addons" | ||||||
|  |         - "/data/{{ odoo_user }}/odoo/ext/3rd-party-addons" | ||||||
|  |       odoo_workdir: "/data/{{ odoo_user }}/odoo" | ||||||
|  |       odoo_rootdir: "/data/{{ odoo_user }}/odoo" | ||||||
|  |       odoo_coredir: "/data/{{ odoo_user }}/odoo/ext/odoo" | ||||||
|  |       odoo_config_file: "/data/{{ odoo_user }}/{{ odoo_service }}.conf" | ||||||
|  |       odoo_config_data_dir: "/data/{{ odoo_user }}/.local/share/Odoo" | ||||||
|  | @ -19,23 +19,12 @@ | ||||||
|   tags: |   tags: | ||||||
|     - odoo_user |     - odoo_user | ||||||
| 
 | 
 | ||||||
| - name: Add general odoo user | - name: Allow odoo user to have passwordless sudo for restart | ||||||
|   user: name=odoo shell=/bin/bash |  | ||||||
|         password={{ odoo_general_user_passwd }} update_password=on_create |  | ||||||
|         move_home=yes |  | ||||||
|         home=/data/odoo |  | ||||||
| 
 |  | ||||||
|   become: yes |  | ||||||
|   become_method: "sudo" |  | ||||||
|   tags: |  | ||||||
|     - odoo_user |  | ||||||
| 
 |  | ||||||
| - name: Allow general odoo user to have passwordless sudo |  | ||||||
|   lineinfile: |   lineinfile: | ||||||
|     dest: /etc/sudoers |     dest: /etc/sudoers | ||||||
|     state: present |     state: present | ||||||
|     regexp: '^odoo$' |     regexp: '^odoo$' | ||||||
|     line: 'odoo ALL=(ALL:ALL) NOPASSWD: ALL' |     line: '{{ odoo_instance }} ALL=(root) NOPASSWD: /etc/init.d/{{ odoo_instance }}' | ||||||
|     validate: visudo -cf %s |     validate: visudo -cf %s | ||||||
| 
 | 
 | ||||||
| - name: Create log directory | - name: Create log directory | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue