install_apt_repo added
This commit is contained in:
		
							parent
							
								
									7c8683ca64
								
							
						
					
					
						commit
						31c8f0266b
					
				
							
								
								
									
										29
									
								
								lib.cf
								
								
								
								
							
							
						
						
									
										29
									
								
								lib.cf
								
								
								
								
							| 
						 | 
				
			
			@ -172,3 +172,32 @@ reports:
 | 
			
		|||
	
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bundle agent install_apt_repo(name,repo_src,key_src,key_name)
 | 
			
		||||
{
 | 
			
		||||
classes:
 | 
			
		||||
	debian|ubuntu::
 | 
			
		||||
		"do_install" expression => not(fileexists("/etc/apt/sources.list.d/$(name).list"));
 | 
			
		||||
	
 | 
			
		||||
		
 | 
			
		||||
vars:
 | 
			
		||||
	do_install::
 | 
			
		||||
		"pkgs" slist => {
 | 
			
		||||
			"curl",
 | 
			
		||||
			"ca-certificates",
 | 
			
		||||
			"lsb-release"
 | 
			
		||||
		};
 | 
			
		||||
 | 
			
		||||
		"add_repo_cmd" string => "/usr/bin/add-apt-repository";
 | 
			
		||||
 | 
			
		||||
methods:
 | 
			
		||||
	do_install::
 | 
			
		||||
		"any" usebundle => wmde_install_packages(@(pkgs),"apt_repo");
 | 
			
		||||
 | 
			
		||||
commands:
 | 
			
		||||
	do_install::
 | 
			
		||||
		"/bin/sh"
 | 
			
		||||
		args => "$(sys.workdir)/inputs/$(def.wmde_libdir)/scripts/install-php-repo.sh  $(name) $(repo_src) $(key_src) $(key_name)";
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue