Add letsrenew role
This commit is contained in:
		
					parent
					
						
							
								84799fc22b
							
						
					
				
			
			
				commit
				
					
						cee2fde3ac
					
				
			
		
					 6 changed files with 87 additions and 6 deletions
				
			
		
							
								
								
									
										40
									
								
								roles/letsrenew/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								roles/letsrenew/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,40 @@ | |||
| --- | ||||
| - name: create /opt/certbot | ||||
|   file: | ||||
|     path: /opt/certbot | ||||
|     mode: 0750 | ||||
|     state: directory | ||||
| 
 | ||||
| - name: download certbot | ||||
|   get_url: | ||||
|     url: https://raw.githubusercontent.com/certbot/certbot/master/certbot-auto | ||||
|     dest: /opt/certbot/certbot-auto | ||||
|     mode: 0550 | ||||
| 
 | ||||
| - name: create webroot path | ||||
|   file: | ||||
|     path: "{{ letsrenew_webroot }}" | ||||
|     state: directory | ||||
| 
 | ||||
| - name: create /etc/letsencrypt | ||||
|   file: | ||||
|     path: /etc/letsencrypt | ||||
|     state: directory | ||||
| 
 | ||||
| - name: template cli.ini | ||||
|   template: | ||||
|     src: cli.ini.j2 | ||||
|     dest: /etc/letsencrypt/cli.ini | ||||
| 
 | ||||
| - name: clone letsrenew | ||||
|   git: | ||||
|     repo: https://github.com/7adietri/letsrenew.git | ||||
|     dest: /opt/letsrenew | ||||
| 
 | ||||
| - name: create cronjob | ||||
|   cron: | ||||
|     name: "Let's Encrypt certificate renewal" | ||||
|     job: "/opt/letsrenew/letsrenew {{ letsrenew_email }} /opt/certbot/certbot-auto" | ||||
|     minute: 0 | ||||
|     hour: 6 | ||||
|     weekday: 1 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alexander Dietrich
				Alexander Dietrich