Avoid using pre and post task sections, they don't always log to the output if being skipped.
This commit is contained in:
		
							
								
								
									
										25
									
								
								local.yml
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								local.yml
									
									
									
									
									
								
							@@ -7,7 +7,7 @@
 | 
				
			|||||||
  connection: local
 | 
					  connection: local
 | 
				
			||||||
  become: true  
 | 
					  become: true  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  pre_tasks:
 | 
					  tasks:
 | 
				
			||||||
    - include: facts/general/system.yml
 | 
					    - include: facts/general/system.yml
 | 
				
			||||||
    - include: facts/general/package.yml
 | 
					    - include: facts/general/package.yml
 | 
				
			||||||
    - include: facts/general/service.yml
 | 
					    - include: facts/general/service.yml
 | 
				
			||||||
@@ -15,7 +15,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    - include: tasks/general/start.yml
 | 
					    - include: tasks/general/start.yml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  tasks:
 | 
					 | 
				
			||||||
    - include: tasks/general/software/packages.yml
 | 
					    - include: tasks/general/software/packages.yml
 | 
				
			||||||
    - include: tasks/general/software/services.yml
 | 
					    - include: tasks/general/software/services.yml
 | 
				
			||||||
      ignore_errors: yes
 | 
					      ignore_errors: yes
 | 
				
			||||||
@@ -44,11 +43,10 @@
 | 
				
			|||||||
  connection: local
 | 
					  connection: local
 | 
				
			||||||
  become: true
 | 
					  become: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  pre_tasks:
 | 
					  tasks:
 | 
				
			||||||
    - include: facts/general/system.yml
 | 
					    - include: facts/general/system.yml
 | 
				
			||||||
    - include: facts/workstation/package.yml
 | 
					    - include: facts/workstation/package.yml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  tasks:
 | 
					 | 
				
			||||||
    # Set up any systems that do not come with Desktop Environments
 | 
					    # Set up any systems that do not come with Desktop Environments
 | 
				
			||||||
    # TODO Need to refactor. Maybe tasks/workstation/setup_gui/freebsd.yml
 | 
					    # TODO Need to refactor. Maybe tasks/workstation/setup_gui/freebsd.yml
 | 
				
			||||||
    - include: tasks/workstation/freebsd/software/gui.yml
 | 
					    - include: tasks/workstation/freebsd/software/gui.yml
 | 
				
			||||||
@@ -67,10 +65,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    - include: tasks/workstation/linux/cron/ansible.yml
 | 
					    - include: tasks/workstation/linux/cron/ansible.yml
 | 
				
			||||||
      when: ansible_system == "Linux"
 | 
					      when: ansible_system == "Linux"
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  post_tasks:
 | 
					 | 
				
			||||||
    - include: tasks/workstation/settings/gnome.yml
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - include: tasks/workstation/settings/gnome.yml
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Additional setup for miners!
 | 
					# Additional setup for miners!
 | 
				
			||||||
@@ -79,7 +76,8 @@
 | 
				
			|||||||
  connection: local
 | 
					  connection: local
 | 
				
			||||||
  become: true
 | 
					  become: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  pre_tasks:
 | 
					  tasks:
 | 
				
			||||||
 | 
					    ##### Setup #####
 | 
				
			||||||
    - include: tasks/miner/debug.yml
 | 
					    - include: tasks/miner/debug.yml
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    - include: facts/miner/gather.yml
 | 
					    - include: facts/miner/gather.yml
 | 
				
			||||||
@@ -90,8 +88,7 @@
 | 
				
			|||||||
    - include: facts/miner/config.yml
 | 
					    - include: facts/miner/config.yml
 | 
				
			||||||
    - include: facts/miner/pool.yml
 | 
					    - include: facts/miner/pool.yml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Installations
 | 
					    ##### Installations #####
 | 
				
			||||||
  tasks:
 | 
					 | 
				
			||||||
    ### CPU SECTION ###
 | 
					    ### CPU SECTION ###
 | 
				
			||||||
    # Monero #
 | 
					    # Monero #
 | 
				
			||||||
    - include: tasks/miner/software/xmr-stak-cpu.yml
 | 
					    - include: tasks/miner/software/xmr-stak-cpu.yml
 | 
				
			||||||
@@ -109,8 +106,7 @@
 | 
				
			|||||||
    - include: tasks/miner/software/nanominer.yml
 | 
					    - include: tasks/miner/software/nanominer.yml
 | 
				
			||||||
      when: nanominer is defined
 | 
					      when: nanominer is defined
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Scheduling
 | 
					    ### Scheduling ###
 | 
				
			||||||
  post_tasks:
 | 
					 | 
				
			||||||
    - include: tasks/miner/cron/ansible.yml
 | 
					    - include: tasks/miner/cron/ansible.yml
 | 
				
			||||||
    - include: tasks/miner/cron/mfn.yml
 | 
					    - include: tasks/miner/cron/mfn.yml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -135,11 +131,11 @@
 | 
				
			|||||||
    - include: tasks/server/software/grafana.yml
 | 
					    - include: tasks/server/software/grafana.yml
 | 
				
			||||||
      when: grafana is defined and ansible_pkg_mgr == "apt"
 | 
					      when: grafana is defined and ansible_pkg_mgr == "apt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  post_tasks:
 | 
					 | 
				
			||||||
    - include: tasks/server/cron/certbot.yml
 | 
					    - include: tasks/server/cron/certbot.yml
 | 
				
			||||||
      when: certbot is defined
 | 
					      when: certbot is defined
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Provide information for analysis.
 | 
					# Provide information for analysis.
 | 
				
			||||||
- name: Main | Reporting
 | 
					- name: Main | Reporting
 | 
				
			||||||
  hosts: localhost
 | 
					  hosts: localhost
 | 
				
			||||||
@@ -152,5 +148,4 @@
 | 
				
			|||||||
    - include: tasks/general/tests/nmap.yml
 | 
					    - include: tasks/general/tests/nmap.yml
 | 
				
			||||||
    - include: tasks/general/tests/lynis.yml
 | 
					    - include: tasks/general/tests/lynis.yml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  post_tasks:
 | 
					    - include: tasks/general/finish.yml
 | 
				
			||||||
    - include: tasks/general/finish.yml
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user