-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a .devenv file and adjust the test.yml playbook to be able to test the role in local
- Loading branch information
Showing
7 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# File created with devenv init command | ||
|
||
NAME="odoo-role-test" | ||
DISTRIBUTION="ubuntu" | ||
RELEASE="jammy" | ||
ARCH="amd64" | ||
HOST="$NAME.local" | ||
|
||
# Select the python interpeter python2.7 or python3 | ||
PYTHON_INTERPRETER=python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[defaults] | ||
roles_path = ../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
localhost | ||
|
||
[devenv] | ||
odoo-role-test.local ansible_host=odoo-role-test.local | ||
[all] | ||
localhost ansible_connection=local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
odoo14-addon-web_responsive==14.0.1.2.3.dev4 | ||
odoo14-addon-web_environment_ribbon==14.0.1.0.1.dev11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
- name: Install pip | ||
apt: | ||
name: python3-pip | ||
|
||
- name: Install psycopg2 | ||
pip: | ||
name: psycopg2-binary | ||
|
||
- name: Install PostgreSQL | ||
apt: | ||
name: postgresql | ||
state: present | ||
update_cache: true | ||
when: ansible_os_family == "Debian" | ||
|
||
- name: Ensure PostgreSQL is running | ||
service: | ||
name: postgresql | ||
state: started | ||
enabled: true | ||
|
||
- name: Create a database user for Odoo | ||
become: true | ||
become_user: postgres | ||
postgresql_user: | ||
name: odoo | ||
state: present | ||
role_attr_flags: LOGIN,CREATEDB | ||
|
||
- name: Create a database for Odoo | ||
become: true | ||
become_user: postgres | ||
postgresql_db: | ||
name: odoo | ||
owner: odoo | ||
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
--- | ||
- hosts: localhost | ||
- hosts: devenv | ||
remote_user: root | ||
become: true | ||
# This is needed to be able to test the role without postgresql role | ||
tasks: | ||
- include_tasks: setup_postgresql.yml | ||
|
||
- hosts: devenv | ||
remote_user: root | ||
become: true | ||
roles: | ||
- odoo-role | ||
vars: | ||
odoo_role_odoo_url: "https://git.coopdevs.org/coopdevs/odoo/OCB/-/archive/{{ odoo_role_odoo_release }}/OCB-{{ odoo_role_odoo_release }}.tar.gz" | ||
odoo_role_odoo_version: "14.0" | ||
odoo_role_odoo_release: "{{ odoo_role_odoo_version }}" | ||
odoo_role_community_modules_requirements_path: requirements.txt | ||
odoo_role_odoo_http_interface: 0.0.0.0 |