diff options
author | Dan Fedele <dan.fedele@gmail.com> | 2023-06-13 10:59:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 10:59:02 -0400 |
commit | b8e08d78024e53ecbb00267623a5aea73e6b538d (patch) | |
tree | 269e6a5402d34a650e8313dacc91111611aa0295 /roles/package-mgmt | |
parent | 8986e5bcabccb476a9088fe925a3ba05ed517053 (diff) | |
parent | dfa9f2398bd614f73a0df92cbcfd561c609a2f3b (diff) |
Merge pull request #5 from AgroDan/dev
Merge pull request #4 from AgroDan/master
Diffstat (limited to 'roles/package-mgmt')
-rw-r--r-- | roles/package-mgmt/README.md | 9 | ||||
-rw-r--r-- | roles/package-mgmt/defaults/main.yml | 2 | ||||
-rw-r--r-- | roles/package-mgmt/handlers/main.yml | 2 | ||||
-rw-r--r-- | roles/package-mgmt/meta/main.yml | 52 | ||||
-rw-r--r-- | roles/package-mgmt/tasks/main.yml | 79 | ||||
-rw-r--r-- | roles/package-mgmt/tests/inventory | 2 | ||||
-rw-r--r-- | roles/package-mgmt/tests/test.yml | 5 | ||||
-rw-r--r-- | roles/package-mgmt/vars/main.yml | 6 |
8 files changed, 157 insertions, 0 deletions
diff --git a/roles/package-mgmt/README.md b/roles/package-mgmt/README.md new file mode 100644 index 0000000..01452d7 --- /dev/null +++ b/roles/package-mgmt/README.md @@ -0,0 +1,9 @@ +Package Mgmt +========= + +This role will handle any OS-level patching and package installs, including the installation of keys for repositories and such. This role typically takes a while to run because I always make sure I am patched and up to date before doing anything, and then of course the individual packages just take a while to install. + +Role Variables +-------------- + +I have added the URLs to the specific keys I am using to install the repositories for things like Docker and Sublime Text. diff --git a/roles/package-mgmt/defaults/main.yml b/roles/package-mgmt/defaults/main.yml new file mode 100644 index 0000000..57adef2 --- /dev/null +++ b/roles/package-mgmt/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for package-mgmt diff --git a/roles/package-mgmt/handlers/main.yml b/roles/package-mgmt/handlers/main.yml new file mode 100644 index 0000000..ef24490 --- /dev/null +++ b/roles/package-mgmt/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for package-mgmt diff --git a/roles/package-mgmt/meta/main.yml b/roles/package-mgmt/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/roles/package-mgmt/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/roles/package-mgmt/tasks/main.yml b/roles/package-mgmt/tasks/main.yml new file mode 100644 index 0000000..ca5381e --- /dev/null +++ b/roles/package-mgmt/tasks/main.yml @@ -0,0 +1,79 @@ +--- +# tasks file for package-mgmt +- name: Add Docker repo key + ansible.builtin.shell: curl -fsSL {{ docker_repo_key }} | gpg --dearmor --batch --yes -o /etc/apt/trusted.gpg.d/docker-ce-keyring.gpg + +- name: Add Docker repo + ansible.builtin.apt_repository: + repo: "{{ docker_repo }}" + state: present + +- name: Add Sublime Text repo key + ansible.builtin.shell: curl -fsSL {{ sublime_repo_key }} | gpg --dearmor --batch --yes -o /etc/apt/trusted.gpg.d/sublime-text-keyring.gpg + +- name: Add Sublime Text repo + ansible.builtin.apt_repository: + repo: "{{ sublime_repo }}" + state: present + +- name: Ensuring all packages are up to date + ansible.builtin.apt: + update_cache: yes + upgrade: dist + +- name: Installing one-off packages from package manager + ansible.builtin.package: + name: + - bloodhound + - build-essential + - bytecode-viewer + - clang + - cmake + - crackmapexec + - curl + - default-jdk + - default-jre + - docker + - docker-compose + - eog + - feroxbuster + - flex + - forensics-extra + - gawk + - gdb + - gdbserver + - ghidra + - git + - gobuster + - golang-go + - jq + - jxplorer + - libffi-dev + - liblzma-dev + - libssl-dev + - libxml2-dev + - ltrace + - ncat + - neo4j + - ntpdate + - mingw-w64 + - patch + - powershell + - python3 + - python3-dev + - python3-pip + - p7zip-full + - remmina + - rlwrap + - samba + - seclists + - steghide + - strace + - sublime-text + - terminator + - tmux + - xclip + - xfce4-terminal + - zaproxy + - zlib1g-dev + state: latest diff --git a/roles/package-mgmt/tests/inventory b/roles/package-mgmt/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/package-mgmt/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/package-mgmt/tests/test.yml b/roles/package-mgmt/tests/test.yml new file mode 100644 index 0000000..929b029 --- /dev/null +++ b/roles/package-mgmt/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - package-mgmt diff --git a/roles/package-mgmt/vars/main.yml b/roles/package-mgmt/vars/main.yml new file mode 100644 index 0000000..8bb393e --- /dev/null +++ b/roles/package-mgmt/vars/main.yml @@ -0,0 +1,6 @@ +--- +# vars file for package-mgmt +docker_repo_key: "https://download.docker.com/linux/debian/gpg" +docker_repo: "deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable" +sublime_repo_key: "https://download.sublimetext.com/sublimehq-pub.gpg" +sublime_repo: "deb https://download.sublimetext.com/ apt/stable/" |