| 
									
										
										
										
											2011-02-02 14:02:29 +01:00
										 |  |  | # | 
					
						
							|  |  |  | # This is a sample manifest, but used in real world | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-24 15:14:00 +01:00
										 |  |  | # This is debug and should not be in a production environment | 
					
						
							| 
									
										
										
										
											2011-03-09 20:22:02 +01:00
										 |  |  | # echo "We could access other manifests in $__manifest" | 
					
						
							| 
									
										
										
										
											2011-02-24 15:14:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-09 20:22:02 +01:00
										 |  |  | # Every machine becomes a marker, so sysadmins know that automatic | 
					
						
							|  |  |  | # configurations are happening | 
					
						
							| 
									
										
										
										
											2011-03-16 08:39:51 +01:00
										 |  |  | __file /etc/cdist-configured | 
					
						
							| 
									
										
										
										
											2011-02-25 02:13:11 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-24 15:14:00 +01:00
										 |  |  | case "$__target_host" in | 
					
						
							| 
									
										
										
										
											2011-03-03 08:55:02 +01:00
										 |  |  |    # Everybody has this | 
					
						
							| 
									
										
										
										
											2011-02-22 17:25:31 +01:00
										 |  |  |    localhost) | 
					
						
							| 
									
										
										
										
											2011-03-18 02:01:37 +01:00
										 |  |  |       require="__file/etc/cdist-configured" __link /tmp/cdist-testfile \ | 
					
						
							|  |  |  |          --source /etc/cdist-configured  --type symbolic | 
					
						
							|  |  |  |       require="__directory/tmp/cdist-test-dir" __file /tmp/cdist-test-dir/test-file \ | 
					
						
							|  |  |  |          --mode 0750 --owner nobody --group root | 
					
						
							| 
									
										
										
										
											2011-03-18 01:51:44 +01:00
										 |  |  |       __directory /tmp/cdist-test-dir --mode 4777 | 
					
						
							| 
									
										
										
										
											2011-03-18 02:01:37 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |       require="__file/etc/cdist-configured __link/tmp/cdist-testfile" \ | 
					
						
							|  |  |  |          __file /tmp/cdist-another-testfile | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-19 00:01:39 +01:00
										 |  |  |    ;; | 
					
						
							| 
									
										
										
										
											2011-02-22 16:11:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-09 20:22:02 +01:00
										 |  |  |    # | 
					
						
							|  |  |  |    # Examples using different types | 
					
						
							|  |  |  |    # | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-02 23:34:34 +01:00
										 |  |  |    # Alias in /etc/hosts for localhost | 
					
						
							|  |  |  |    cdist-archlinux) | 
					
						
							| 
									
										
										
										
											2011-03-09 20:22:02 +01:00
										 |  |  |       # This is the specific package type for pacman | 
					
						
							| 
									
										
										
										
											2011-03-02 23:34:34 +01:00
										 |  |  |       __package_pacman zsh --state installed | 
					
						
							| 
									
										
										
										
											2011-03-09 20:22:02 +01:00
										 |  |  |        | 
					
						
							|  |  |  |       # The __package type autoselect the right type based on the os | 
					
						
							|  |  |  |       __package vim --state installed | 
					
						
							| 
									
										
										
										
											2011-03-09 22:21:39 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |       # If the type is a singleton, it does not take an object id | 
					
						
							|  |  |  |       __issue | 
					
						
							| 
									
										
										
										
											2011-03-02 23:34:34 +01:00
										 |  |  |    ;; | 
					
						
							| 
									
										
										
										
											2011-03-09 20:22:02 +01:00
										 |  |  |    # This is how it would look like on gentoo | 
					
						
							| 
									
										
										
										
											2011-03-03 08:44:03 +01:00
										 |  |  |    cdist-gentoo) | 
					
						
							| 
									
										
										
										
											2011-03-09 20:22:02 +01:00
										 |  |  |       # Same stuff for gentoo | 
					
						
							| 
									
										
										
										
											2011-03-03 08:44:58 +01:00
										 |  |  |       __package tree --state installed | 
					
						
							| 
									
										
										
										
											2011-03-03 08:44:03 +01:00
										 |  |  |    ;; | 
					
						
							| 
									
										
										
										
											2011-03-16 11:20:18 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-09 20:22:02 +01:00
										 |  |  |    cdist-debian) | 
					
						
							|  |  |  |       __package_apt atop --state installed | 
					
						
							|  |  |  |       __package apache2 --state deinstalled | 
					
						
							| 
									
										
										
										
											2011-03-04 02:06:13 +01:00
										 |  |  |    ;; | 
					
						
							| 
									
										
										
										
											2011-03-09 20:22:02 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-16 11:20:18 +01:00
										 |  |  |    cdist-redhat) | 
					
						
							|  |  |  |       __issue | 
					
						
							|  |  |  |       __motd | 
					
						
							|  |  |  |    ;; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-09 20:22:02 +01:00
										 |  |  |    # Real machines may be used with their hostname or fqdn, | 
					
						
							|  |  |  |    # depending on how you call cdist-deploy-to | 
					
						
							|  |  |  |    # machine) | 
					
						
							|  |  |  |    # ... | 
					
						
							|  |  |  |    # ;; | 
					
						
							|  |  |  |    # machine.example.org) | 
					
						
							|  |  |  |    # ... | 
					
						
							|  |  |  |    # ;; | 
					
						
							| 
									
										
										
										
											2010-11-01 00:09:30 +01:00
										 |  |  | esac |