Ajouter tasks/setup-redhat.yml
This commit is contained in:
		
							parent
							
								
									4e54edef9b
								
							
						
					
					
						commit
						1f5daf1965
					
				
					 1 changed files with 31 additions and 0 deletions
				
			
		
							
								
								
									
										31
									
								
								tasks/setup-redhat.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								tasks/setup-redhat.yml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
---
 | 
			
		||||
- name: Ensure old versions of Docker are not installed.
 | 
			
		||||
  package:
 | 
			
		||||
    name:
 | 
			
		||||
      - docker-ce
 | 
			
		||||
      - docker-ce-cli
 | 
			
		||||
      - containerd.io
 | 
			
		||||
      - docker-buildx-plugin
 | 
			
		||||
      - docker-compose-plugin
 | 
			
		||||
    state: absent
 | 
			
		||||
 | 
			
		||||
- name: Install yum-utils package.
 | 
			
		||||
  package:
 | 
			
		||||
    name:
 | 
			
		||||
      - yum-utils
 | 
			
		||||
    state: present
 | 
			
		||||
 | 
			
		||||
- name: Add docker-ce repository via yum-config-manager.
 | 
			
		||||
  shell: yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
 | 
			
		||||
  args:
 | 
			
		||||
    creates: /etc/yum.repos.d/docker-ce.repo 
 | 
			
		||||
 | 
			
		||||
- name: Install docker-ce packages.
 | 
			
		||||
  package:
 | 
			
		||||
    name:
 | 
			
		||||
      - docker-ce
 | 
			
		||||
      - docker-ce-cli
 | 
			
		||||
      - containerd.io
 | 
			
		||||
      - docker-buildx-plugin
 | 
			
		||||
      - docker-compose-plugin
 | 
			
		||||
    state: present
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue