mirror of
				https://gitlab.sectorq.eu/jaydee/ansible.git
				synced 2025-10-31 02:11:10 +01:00 
			
		
		
		
	111
This commit is contained in:
		
							
								
								
									
										11
									
								
								hosts.yml
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								hosts.yml
									
									
									
									
									
								
							| @@ -40,7 +40,7 @@ datacenter: | |||||||
|         ansible_become_password: lacijaydee |         ansible_become_password: lacijaydee | ||||||
|     rhasspy: |     rhasspy: | ||||||
|       hosts: |       hosts: | ||||||
|         192.168.77.13[6:7] |         192.168.77.16[6:7] | ||||||
|       vars: |       vars: | ||||||
|         ansible_user: admin |         ansible_user: admin | ||||||
|         ansible_ssh_pass: l4c1j4yd33Du5lo |         ansible_ssh_pass: l4c1j4yd33Du5lo | ||||||
| @@ -74,6 +74,15 @@ datacenter: | |||||||
|             ansible_ssh_pass: q |             ansible_ssh_pass: q | ||||||
|             ansible_become_user: root |             ansible_become_user: root | ||||||
|             ansible_become_password: l4c1j4yd33Du5lo |             ansible_become_password: l4c1j4yd33Du5lo | ||||||
|  |         raspberrypi5: | ||||||
|  |           hosts: | ||||||
|  |             192.168.77.238 | ||||||
|  |           vars: | ||||||
|  |             ansible_python_interpreter: /usr/bin/python | ||||||
|  |             ansible_ssh_user: jd | ||||||
|  |             ansible_ssh_pass: q | ||||||
|  |             ansible_become_user: root | ||||||
|  |             ansible_become_password: l4c1j4yd33Du5lo | ||||||
|         nas: |         nas: | ||||||
|           hosts: |           hosts: | ||||||
|             192.168.77.106: |             192.168.77.106: | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| - hosts: odroid_cluster | - hosts: datacenter | ||||||
|   name: Install omv |   name: Install omv | ||||||
|   become: true |   become: true | ||||||
|   gather_facts: no |   gather_facts: no | ||||||
|   | |||||||
| @@ -59,7 +59,17 @@ | |||||||
|         path: /etc/zabbix/zabbix_agent2.conf |         path: /etc/zabbix/zabbix_agent2.conf | ||||||
|         regexp: "^Hostname=.*" |         regexp: "^Hostname=.*" | ||||||
|         line: "Hostname={{ansible_hostname}}" |         line: "Hostname={{ansible_hostname}}" | ||||||
|  |     - name: Reconfigure zabbix-agent2 hostname | ||||||
|  |       ansible.builtin.lineinfile: | ||||||
|  |         path: /etc/zabbix/zabbix_agent2.conf | ||||||
|  |         regexp: "^UserParameter=.*" | ||||||
|  |         insertafter: '^# UserParameter=' | ||||||
|  |         line: "UserParameter=system.temperature,vcgencmd measure_temp" | ||||||
|  |     - name: Add the user 'james' with a bash shell, appending the group 'admins' and 'developers' to the user's groups | ||||||
|  |       ansible.builtin.user: | ||||||
|  |         name: zabbix | ||||||
|  |         groups: video | ||||||
|  |         append: yes | ||||||
|     - name: Restart zabbix-agent2 service |     - name: Restart zabbix-agent2 service | ||||||
|       ansible.builtin.service: |       ansible.builtin.service: | ||||||
|         name: zabbix-agent2.service |         name: zabbix-agent2.service | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| - hosts: odroid_cluster | - hosts: datacenter | ||||||
|   name: Install docker |   name: Install docker1 | ||||||
|   become: true |   become: true | ||||||
|   become_user: root |   become_user: root | ||||||
|   gather_facts: no |   gather_facts: no | ||||||
| @@ -25,3 +25,22 @@ | |||||||
|         name: |         name: | ||||||
|           - python3-pip |           - python3-pip | ||||||
|           - python3-dev |           - python3-dev | ||||||
|  |     - name: Create a directory docker.service.d | ||||||
|  |       ansible.builtin.file: | ||||||
|  |         path: /etc/systemd/system/docker.service.d/ | ||||||
|  |         state: directory | ||||||
|  |         mode: '0755' | ||||||
|  |     - name: Creating a file with content | ||||||
|  |       copy: | ||||||
|  |         dest: "/etc/systemd/system/docker.service.d/override.conf" | ||||||
|  |         content: | | ||||||
|  |           [Service] | ||||||
|  |           ExecStart= | ||||||
|  |           ExecStart=/usr/sbin/dockerd -H fd:// -H tcp://0.0.0.0:2375 | ||||||
|  |     - name: Just force systemd to reread configs (2.4 and above) | ||||||
|  |       ansible.builtin.systemd_service: | ||||||
|  |         daemon_reload: true | ||||||
|  |     - name: Restart docker service | ||||||
|  |       ansible.builtin.service: | ||||||
|  |         name: docker.service | ||||||
|  |         state: restarted | ||||||
| @@ -9,3 +9,6 @@ | |||||||
|     - name: Syncing mailu |     - name: Syncing mailu | ||||||
|       ansible.builtin.shell: 'rsync -ra /share/docker_data/mailu2/* admin@192.168.77.246:/share/docker_data/mailu2' |       ansible.builtin.shell: 'rsync -ra /share/docker_data/mailu2/* admin@192.168.77.246:/share/docker_data/mailu2' | ||||||
|       when: inventory_hostname in groups['nas'] |       when: inventory_hostname in groups['nas'] | ||||||
|  |     - name: Syncing mailu | ||||||
|  |       ansible.builtin.shell: 'rsync -ra /share/docker_data/mailu2/* admin@192.168.77.238:/share/docker_data/mailu2' | ||||||
|  |       when: inventory_hostname in groups['nas'] | ||||||
		Reference in New Issue
	
	Block a user
	 jaydee
					jaydee