70 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Puppet
		
	
	
	
			
		
		
	
	
			70 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Puppet
		
	
	
	
| #x
 | |
| 
 | |
| class odoo::params{
 | |
| 	$odoo_user = 'odoo'
 | |
| 	$odoo_user_homedir = '/usr/home/odoo'
 | |
| 	$homedirs = '/usr/home'
 | |
| 	$odoo_systemdir = "$odoo_user_homedir/system"
 | |
| 
 | |
| 
 | |
| 	$logdir = "/var/log/odoo"
 | |
| 	$logfile = "/var/log/odoo.log"
 | |
| 
 | |
| 	$reposdir = "/tmp/repos"
 | |
| 
 | |
| 	case  $::osfamily {
 | |
| 		'FreeBSD':{
 | |
| 			$postgrespkgs = "postgresql96-server"
 | |
| 			$postgresuser = "postgres"
 | |
| 			$postgresdatadir = "/var/db/postgres/data96"
 | |
| 			$postgresinitcmd = "/usr/local/bin/initdb -D $postgresdatadir"
 | |
| 			$postgresusercreate = "/usr/local/bin/createuser -S odoo"
 | |
| 			$postgresuserexists = "/usr/local/bin/psql -t -c '\du' | cut -d \| -f 1 | grep -qw odoo"
 | |
| 
 | |
| 			$prepkg = [
 | |
| 				"cyrus-sasl",
 | |
| 				"textproc/py-libxml2",
 | |
| 				"jpeg", 
 | |
| 				"python27", 
 | |
| 				"devel/py-pip", 
 | |
| 				"git", 
 | |
| 				"postgresql96-client", 
 | |
| 				"gcc", 
 | |
| 				"libxslt",
 | |
| 				"openldap-client",
 | |
| 			]
 | |
| 			$pip_cmd = "/usr/local/bin/pip-2.7"
 | |
| 			$preenv = "export CC=gcc && export C_INCLUDE_PATH=/usr/local/include/libxml2:/usr/local/include/sasl:/usr/local/include"
 | |
| 			$conffile = "/usr/local/etc/odoo-server.conf"
 | |
| 		
 | |
| 		}	
 | |
| 		default: {
 | |
| 			$git_pkg = "git"
 | |
| 			$python3_pkg = "python3"
 | |
| 			$pip3_pkg = "pip3"
 | |
| 
 | |
| 			$pip_cmd = "/usr/bin/pip"
 | |
| 			$preenv = "export CC=gcc && export C_INCLUDE_PATH=/usr/local/include/libxml2:/usr/local/include/sasl"
 | |
| 			$conffile = "/usr/local/etc/odoo-server.conf"
 | |
| 
 | |
| 			$prepkg = [
 | |
| 				"git",
 | |
| 				"python3-pip",
 | |
| #				"cyrus-sasl",
 | |
| #				"textproc/py-libxml2",
 | |
| #				"jpeg", 
 | |
| #				"python", 
 | |
| #				"devel/py-pip", 
 | |
| #				"git", 
 | |
| #				"postgresql93-client", 
 | |
| #				"gcc", 
 | |
| #				"libxslt",
 | |
| #				"openldap-client",
 | |
| 			]
 | |
| 		}
 | |
| 	}
 | |
| 
 | |
| 
 | |
| 
 | |
| }
 |