mirror of
				https://github.com/gjkcz/ansible-void.git
				synced 2025-11-04 03:50:26 +01:00 
			
		
		
		
	Add more playbook execution examples
This commit is contained in:
		
							
								
								
									
										11
									
								
								readme.md
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								readme.md
									
									
									
									
									
								
							@@ -18,12 +18,23 @@ Void has `sshd` enabled by default as well as having `prohibit-password` set for
 | 
			
		||||
 | 
			
		||||
## Running a playbook
 | 
			
		||||
 | 
			
		||||
Here are some examples for running a playbook.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
ansible-playbook setup.yaml
 | 
			
		||||
ansible-playbook -l teachers setup.yaml
 | 
			
		||||
ansible-playbook -l VU00.local setup.yaml
 | 
			
		||||
ansible-playbook --key-file ~/.ssh/keys/gjk-ansible setup.yaml
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Tags can be used to execute or exclude specific parts of the playbook.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
ansible-playbook -t grub setup.yaml
 | 
			
		||||
ansible-playbook -t [grub, software] setup.yaml
 | 
			
		||||
ansible-playbook --skip-tags software setup.yaml
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## SSH configuration
 | 
			
		||||
 | 
			
		||||
You should setup your ssh to avoid unnecessary settings when running a playbook, for example:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user