forked from CCCHH/ansible-infra
		
	check(playbook): print all held packages
This commit is contained in:
		
					parent
					
						
							
								34b9ee2fa4
							
						
					
				
			
			
				commit
				
					
						5e5c980f14
					
				
			
		
					 1 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -29,3 +29,14 @@
 | 
			
		|||
    - name: Print .dpkg-* files list
 | 
			
		||||
      ansible.builtin.debug:
 | 
			
		||||
        var: check__dpkg_files_list
 | 
			
		||||
 | 
			
		||||
    - name: Get all held packages
 | 
			
		||||
      ansible.builtin.command: apt-mark showhold
 | 
			
		||||
      when: ansible_facts['pkg_mgr'] == "apt"
 | 
			
		||||
      changed_when: false
 | 
			
		||||
      register: check__apt_mark_showhold
 | 
			
		||||
 | 
			
		||||
    - name: Print all held packages
 | 
			
		||||
      ansible.builtin.debug:
 | 
			
		||||
        var: check__apt_mark_showhold.stdout_lines
 | 
			
		||||
      when: check__apt_mark_showhold.stdout_lines != []
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue