diff --git a/hosts.yml b/hosts.yml index 6f4978a..ae30af7 100644 --- a/hosts.yml +++ b/hosts.yml @@ -40,7 +40,7 @@ datacenter: ansible_become_password: lacijaydee rhasspy: hosts: - 192.168.77.13[6:7] + 192.168.77.16[6:7] vars: ansible_user: admin ansible_ssh_pass: l4c1j4yd33Du5lo @@ -74,6 +74,15 @@ datacenter: ansible_ssh_pass: q ansible_become_user: root 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: hosts: 192.168.77.106: diff --git a/playbooks/00_install_ldap_client.yml b/playbooks/00_install_ldap_client.yml index 4f3035d..eb35ad2 100644 --- a/playbooks/00_install_ldap_client.yml +++ b/playbooks/00_install_ldap_client.yml @@ -1,4 +1,4 @@ -- hosts: odroid_cluster +- hosts: datacenter name: Install omv become: true gather_facts: no diff --git a/playbooks/00_install_zabbix_agent.yml b/playbooks/00_install_zabbix_agent.yml index 24d3de2..4a2fbdf 100644 --- a/playbooks/00_install_zabbix_agent.yml +++ b/playbooks/00_install_zabbix_agent.yml @@ -59,7 +59,17 @@ path: /etc/zabbix/zabbix_agent2.conf regexp: "^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 ansible.builtin.service: name: zabbix-agent2.service diff --git a/playbooks/05_install_docker.yml b/playbooks/05_install_docker.yml index 044c2b0..6475fee 100644 --- a/playbooks/05_install_docker.yml +++ b/playbooks/05_install_docker.yml @@ -1,5 +1,5 @@ -- hosts: odroid_cluster - name: Install docker +- hosts: datacenter + name: Install docker1 become: true become_user: root gather_facts: no @@ -25,3 +25,22 @@ name: - python3-pip - 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 \ No newline at end of file diff --git a/playbooks/sync_mailu2_data.yaml b/playbooks/sync_mailu2_data.yaml index 3e352b3..cb29826 100644 --- a/playbooks/sync_mailu2_data.yaml +++ b/playbooks/sync_mailu2_data.yaml @@ -8,4 +8,7 @@ when: inventory_hostname in groups['raspberry'] - name: Syncing mailu ansible.builtin.shell: 'rsync -ra /share/docker_data/mailu2/* admin@192.168.77.246:/share/docker_data/mailu2' + 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'] \ No newline at end of file