diff --git a/Ansible/inventory.yml b/Ansible/inventory.yml index 35c867ec8db3c9229d83c261abed5aeef05e4689..3119dbfb15af9437a6f7d3c30e9297ef79e34f31 100644 --- a/Ansible/inventory.yml +++ b/Ansible/inventory.yml @@ -1,21 +1,6 @@ all: hosts: - www: - hostname: "www" - ansible_host: 192.168.255.251 - ansible_user: arcter - # manager: - # ansible_host: security.manager.arcter - # ansible_user: arcter rimuru: hostname: "rimuru" ansible_host: rimuru ansible_user: arcter - children: - security_req: - hosts: - www: {} - vms: - children: - security_req: {} - # manager: {} diff --git a/Ansible/requirements.galaxy.yaml b/Ansible/requirements.galaxy.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a5362c93fdae8cf92fcf4696619f185b1cff224a --- /dev/null +++ b/Ansible/requirements.galaxy.yaml @@ -0,0 +1,10 @@ +--- +collections: + - ansible.posix + - community.docker + +roles: + - src: git@git.sch.bme.hu:netadmin/ansibleroles/podmanrole.git + scm: git + version: master + name: podman.install \ No newline at end of file diff --git a/Ansible/tasks/Security/hosts/osquery.yml b/Ansible/tasks/Security/hosts/osquery.yml deleted file mode 100644 index d33fd57cb2fd1333c8de94d161b9e30e1ede9285..0000000000000000000000000000000000000000 --- a/Ansible/tasks/Security/hosts/osquery.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -#Install OSquery -- name: Add Osquery key - ansible.builtin.apt.key: - keyserver: hkp://keyserver.ubuntu.com:80 - id: 1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B - state: present - -- name: Add Osquery repository - ansible.builtin.apt_repository: - repo: deb [arch=amd64] https://pkg.osquery.io/deb deb main - state: present - -- name: Appdate apt cache - apt: - update_cache: yes - -- name: Install Osquery - apt: - - osquery - -- name: Enable Osquery - systemd: - daemon_reload: true - name: osquery - enabled: true - state: started diff --git a/Ansible/tasks/Security/hosts/wazuh.yml b/Ansible/tasks/Security/hosts/wazuh.yml deleted file mode 100644 index bca440c1c44b77fe31dc808315b9f44b892b81eb..0000000000000000000000000000000000000000 --- a/Ansible/tasks/Security/hosts/wazuh.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -#Install Wazuh Agent -- name: Add Wazuh GPG key - ansible.builtin.apt.key: - url: https://packages.wazuh.com/key/GPG-KEY-WAZUH - state: present - -- name: Add Wazuh repository - ansible.builtin.apt_repository: - repo: deb https://packages.wazuh.com/4.x/apt/ stable main - state: present - -- name: Appdate apt cache - apt: - update_cache: yes - -- name: Install Wazuh Agent - apt: - - wazuh-agent - -- name: Config Wazuh Agent - shell: "agent-auth -m {{ manager.ansible_host }}" - -- name: Enable Wazuh agent - systemd: - daemon_reload: true - name: wazuh-agent - enabled: true - state: started diff --git a/Ansible/tasks/Security/manager/osquery.yml b/Ansible/tasks/Security/manager/osquery.yml deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/Ansible/tasks/Security/manager/wazuh.yml b/Ansible/tasks/Security/manager/wazuh.yml deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/Ansible/tasks/caddy_install.yml b/Ansible/tasks/caddy_install.yml deleted file mode 100644 index e79c6acf92d01e4efd1013b2be11823aaa5b6dcf..0000000000000000000000000000000000000000 --- a/Ansible/tasks/caddy_install.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- name: Install GPG - become: true - package: - name: gnupg - state: present - -- name: Add the Caddy GPG key - become: true - ansible.builtin.apt_key: - url: https://dl.cloudsmith.io/public/caddy/stable/gpg.key - state: present - - -- name: Add the offical Caddy repository - become: true - ansible.builtin.apt_repository: - repo: "{{ item }}" - state: present - loop: - - deb https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main - - deb-src https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main - -- name: Install Caddy - become: true - package: - name: caddy - state: present diff --git a/Ansible/tasks/init.yml b/Ansible/tasks/init.yml index 315ad3f32389ff62e99312d462c7876ba69e8411..6862ff969f512f50832b25db219aae8467781125 100644 --- a/Ansible/tasks/init.yml +++ b/Ansible/tasks/init.yml @@ -5,21 +5,8 @@ upgrade: yes update_cache: yes -- name: "Install qemu-guest-agent" - become: true - package: - name: "{{item}}" - state: present - with_items: - - qemu-guest-agent - - name: Set hostname become: true ansible.builtin.hostname: name: "{{ hostname }}" -- name: "Enable agent" - become: true - ansible.builtin.service: - name: qemu-guest-agent - enabled: yes diff --git a/Ansible/tasks/installdocker.yml b/Ansible/tasks/installdocker.yml deleted file mode 100644 index 1a85fa720a36cc5806241e3c1bc37da3576ef0b8..0000000000000000000000000000000000000000 --- a/Ansible/tasks/installdocker.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Install Docker and Docker-compose - become: true - package: - name: "{{ item }}" - state: present - with_items: - - docker.io - - docker-compose \ No newline at end of file diff --git a/Ansible/tasks/podman/installpodman.yml b/Ansible/tasks/podman/installpodman.yml deleted file mode 100644 index 1fd55937e0e707ee08db10b0d602b69c8326d240..0000000000000000000000000000000000000000 --- a/Ansible/tasks/podman/installpodman.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -- name: Install GPG - become: true - package: - name: gnupg - state: present - -- include_tasks: "tasks/podman/installpodmanonoldubuntu.yml" - when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "20.04" - -- name: Install podman and python3 - become: true - package: - name: "{{ item }}" - state: present - with_items: - - podman - - python3 - - python3-pip - - python3-venv - -- name: Install podman-compose & dependencies - become: true - pip: - name: - - setuptools - - podman-compose diff --git a/Ansible/tasks/podman/installpodmanonoldubuntu.yml b/Ansible/tasks/podman/installpodmanonoldubuntu.yml deleted file mode 100644 index 7574b863370c9f5d10454e28736e6e8e4564a8fb..0000000000000000000000000000000000000000 --- a/Ansible/tasks/podman/installpodmanonoldubuntu.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- name: Add the Podman GPG key - become: true - ansible.builtin.apt_key: - url: https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/Release.key - state: present - -- name: Add the official Podman Ubuntu 20.04 repository - become: true - ansible.builtin.apt_repository: - repo: deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ / - state: present - -- name: "Podman: Update and upgrade apt packages" - become: true - apt: - upgrade: yes - update_cache: yes - - diff --git a/Ansible/tasks/podman/podman_config.yml b/Ansible/tasks/podman/podman_config.yml deleted file mode 100644 index 57170897a67279e51285a4d234819fa74504dafc..0000000000000000000000000000000000000000 --- a/Ansible/tasks/podman/podman_config.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: Copy registries config - become: true - copy: - src: files/etc/containers/registries.conf - dest: /etc/containers/registries.conf - owner: root - group: root - mode: 0644 - -- name: Enable podman socket service - become: true - systemd: - name: podman.socket - state: started - enabled: yes - -- name: Add read write permission to podman socket - become: true - file: - path: /var/run/podman/podman.sock - owner: root - group: root - mode: '0664'