diff --git a/inventory b/inventory index 1eba812..eea3793 100644 --- a/inventory +++ b/inventory @@ -40,3 +40,4 @@ localtemplate [all:vars] ansible_connection=ssh +ansible_python_interpreter=auto_silent diff --git a/playbooks/hosts/local-mv.yml b/playbooks/hosts/local-mv.yml index 8443a5b..73964a2 100644 --- a/playbooks/hosts/local-mv.yml +++ b/playbooks/hosts/local-mv.yml @@ -21,5 +21,5 @@ - name: ansible.builtin.include_role: - name: ansible-role-security + name: security diff --git a/playbooks/hosts/lxc.yml b/playbooks/hosts/lxc.yml index ac63b23..4f89c1f 100644 --- a/playbooks/hosts/lxc.yml +++ b/playbooks/hosts/lxc.yml @@ -1,5 +1,5 @@ - name: lxc-init - hosts: photoprism + hosts: lxc become: true vars_files: - vault.yml @@ -21,7 +21,7 @@ - name: ansible.builtin.include_role: - name: ansible-role-security + name: security - name: ansible.builtin.include_role: diff --git a/playbooks/hosts/rpi.yml b/playbooks/hosts/rpi.yml index 62eb028..741dd41 100644 --- a/playbooks/hosts/rpi.yml +++ b/playbooks/hosts/rpi.yml @@ -21,8 +21,8 @@ - name: ansible.builtin.include_role: - name: ansible-role-security + name: security - name: ansible.builtin.include_role: - name: ansible-role-docker + name: docker diff --git a/playbooks/hosts/zeus.yml b/playbooks/hosts/zeus.yml index 92cb88f..04a685f 100644 --- a/playbooks/hosts/zeus.yml +++ b/playbooks/hosts/zeus.yml @@ -18,11 +18,11 @@ # #- role: create_user # #- role: linux_config_init # #- role: tools_for_command_line -# #- role: ansible-role-security +# - role: security # #- role: zfs_install -# #- role: nfs_install -# #- role: samba_install -# - role: ansible-role-docker +## - role: nfs +# - role: samba +# - role: docker - name: Pictures @@ -133,7 +133,7 @@ # roles: # - role: create_user # - role: create_zfs_dataset -# - role: create_samba_user +# # smbpasswd -a tata @@ -160,7 +160,7 @@ # roles: # #- role: create_user # #- role: create_zfs_dataset -# - role: mariaDB_install +# - role: mariadb #- name: nginx # hosts: zeus-local @@ -296,7 +296,7 @@ # - vault.yml # - zeus-vars.yml # roles: -# - role: wireguard-server +# - role: wireguard_server #- name: monitoring # hosts: zeus-local diff --git a/playbooks/services/mariadb.yml b/playbooks/services/mariadb.yml index a6c914a..e4dca26 100644 --- a/playbooks/services/mariadb.yml +++ b/playbooks/services/mariadb.yml @@ -9,4 +9,4 @@ tasks: - name: mariadb ansible.builtin.include_role: - name: mariaDB + name: mariadb diff --git a/playbooks/services/wireguard-cerberus.yml b/playbooks/services/wireguard-cerberus.yml index d44f439..ec04778 100644 --- a/playbooks/services/wireguard-cerberus.yml +++ b/playbooks/services/wireguard-cerberus.yml @@ -7,4 +7,4 @@ tasks: - name: wireguard-server ansible.builtin.include_role: - name: wireguard-server + name: wireguard_server diff --git a/playbooks/services/wireguard-client-gen.yml b/playbooks/services/wireguard-client-gen.yml index 65c2f64..f200984 100644 --- a/playbooks/services/wireguard-client-gen.yml +++ b/playbooks/services/wireguard-client-gen.yml @@ -14,7 +14,7 @@ tasks: - name: Copy from template template: - src: ~/.ansible/roles/wireguard-server/templates/wireguardclient.conf + src: ~/.ansible/roles/wireguard_server/templates/wireguardclient.conf dest: ~/{{ user }}.conf owner: "{{ ansible_user_id }}" group: "{{ ansible_user_id }}" diff --git a/playbooks/template-differ.yml b/playbooks/template-differ.yml index 07c55c4..e115972 100644 --- a/playbooks/template-differ.yml +++ b/playbooks/template-differ.yml @@ -5,7 +5,7 @@ - name: template-differ ansible.builtin.include_role: - name: template-differ + name: template_differ vars: interface_name: enp1s0 new_hostname: dvwa diff --git a/playbooks/template.yml b/playbooks/template.yml index f86d619..fa30d78 100644 --- a/playbooks/template.yml +++ b/playbooks/template.yml @@ -21,5 +21,5 @@ - name: ansible.builtin.include_role: - name: ansible-role-security + name: security diff --git a/playbooks/universal.yml b/playbooks/universal.yml index cf9cc1a..b067afe 100644 --- a/playbooks/universal.yml +++ b/playbooks/universal.yml @@ -8,9 +8,9 @@ ip: 192.168.5.5 roles: - role: linux_config_init - - role: import_ssh_key # without sudo + - role: tools_for_command_line # - role: service_start # - role: gui_app_init - # - role: ansible-role-docker + # - role: docker # docker_users: "{{ user }}" diff --git a/templates/wireguardclient.conf b/templates/wireguardclient.conf new file mode 100644 index 0000000..16990ad --- /dev/null +++ b/templates/wireguardclient.conf @@ -0,0 +1,14 @@ +[Interface] +Address = {{ IP }}/24 +DNS = 192.168.5.5 +#PostUP = wifi-wireguard -e +#PostDOWN = wifi-wireguard -d +SaveConfig = false +ListenPort = 40041 +PrivateKey = {{ priv }} + +[Peer] +PublicKey = {{ wireguard_server_pub }} +AllowedIPs = 10.0.0.0/24, 192.168.5.0/24, 192.168.6.0/24, 192.168.100.0/24 +Endpoint = 185.61.86.153:51822 +PersistentKeepalive = 20