first commit

This commit is contained in:
Vakhtang Gvenetadze
2025-03-31 12:34:39 +04:00
commit 3fd2f6bdde
59 changed files with 2017 additions and 0 deletions

38
roles/apps/README.md Normal file
View File

@ -0,0 +1,38 @@
Role Name
=========
A brief description of the role goes here.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).

View File

@ -0,0 +1,2 @@
---
# defaults file for apps

Binary file not shown.

BIN
roles/apps/files/Telegram Normal file

Binary file not shown.

BIN
roles/apps/files/Updater Normal file

Binary file not shown.

View File

@ -0,0 +1,2 @@
---
# handlers file for apps

34
roles/apps/meta/main.yml Normal file
View File

@ -0,0 +1,34 @@
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:
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.

252
roles/apps/tasks/main.yml Normal file
View File

@ -0,0 +1,252 @@
---
# tasks file for apps
- name: Add wireshark stable repository from PPA
ansible.builtin.apt_repository:
repo: ppa:wireshark-dev/stable
become: true
- name: "Update and install packages on server"
ansible.builtin.apt:
name:
- mc
- htop
- mtr
- tmux
- traceroute
- wireguard
- python3.12-venv
- xprintidle
- git
- apt-transport-https
- ca-certificates
- gnupg
- curl
- kalk
- remmina
- wireshark
- zsh
- audacity
- kazam
- ktorrent
- libreoffice
- thunderbird
- fonts-terminus
- freerdp2-x11
- gimp
state: latest
update_cache: true
become: true
# Telegram
- name: Make telegram dir
file:
path: "/opt/apps/telegram/"
state: directory
recurse: true
mode: ugo+rx
become: true
# - name: Copy Telegram
# copy:
# src: Telegram
# dest: "/opt/apps/telegram/telegram"
# mode: ugo+rx
# become: true
# - name: Copy Telegram Updater
# copy:
# src: Updater
# dest: "/opt/apps/telegram/updater"
# mode: ugo+rx
# become: true
- name: "Download telegram"
ansible.builtin.get_url:
url: https://telegram.org/dl/desktop/linux
dest: "{{ tmp_dir }}/tsetup.tar.xz"
mode: ugo+r
become: true
- name: Unarchive telegram
ansible.builtin.shell:
cmd: "tar -xJpf {{ tmp_dir }}/tsetup.tar.xz -C /opt/apps/"
become: true
# google-chrome
- name: "Download google-chrome"
ansible.builtin.get_url:
url: https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dest: "{{ tmp_dir }}/google-chrome-stable_current_amd64.deb"
mode: ugo+rw
- name: "Install google-chrome"
ansible.builtin.apt:
deb: "{{ tmp_dir }}/google-chrome-stable_current_amd64.deb"
become: true
- name: "Download VSCode"
ansible.builtin.get_url:
# url: https://vscode.download.prss.microsoft.com/dbazure/download/stable/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/code_1.95.3-1731513102_amd64.deb
url: https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64
dest: "{{ tmp_dir }}/code_amd64.deb"
mode: ugo+rw
- name: "Install VSCode"
ansible.builtin.apt:
deb: "{{ tmp_dir }}/code_amd64.deb"
become: true
- name: Git checkout tfenv
ansible.builtin.git:
repo: "https://github.com/tfutils/tfenv.git"
dest: "~/.tfenv"
clone: yes
depth: 1
- name: Make .local/bin dir
file:
path: "~/.local/bin"
state: directory
- name: Create a symbolic link on tfenv
ansible.builtin.file:
src: ~/.tfenv/bin/tfenv
dest: ~/.local/bin/tfenv
state: link
- name: Apply profile
shell: source ~/.profile
args:
executable: /bin/bash
- name: Install Terraform
block:
- name: Check if Terraform is installed
ansible.builtin.command: "~/.local/bin/tfenv version-name"
register: tfenv_version_name_result
changed_when: tfenv_version_name_result.rc == 1
failed_when: tfenv_version_name_result.rc not in [0, 1]
- name: Install Terraform binary
ansible.builtin.shell:
cmd: "~/.local/bin/tfenv install 1.5.0 && ~/.local/bin/tfenv use"
when: tfenv_version_name_result is changed
#gcloud
- name: Add google GPG apt Key
apt_key:
url: https://packages.cloud.google.com/apt/doc/apt-key.gpg
state: present
keyring: /usr/share/keyrings/cloud.google.gpg
become: true
- name: Add GCloud Repository
apt_repository:
repo: deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main
state: present
become: true
- name: Update apt and install google-cloud-cli
apt:
name: google-cloud-cli
state: latest
update_cache: true
become: true
# KeePassXC
- name: Make keepassxc dir
file:
path: "/opt/apps/keepassxc/"
state: directory
recurse: true
mode: ugo+rx
become: true
- name: Copy KeePassXC
copy:
src: KeePassXC-2.7.10-x86_64.AppImage
dest: "/opt/apps/keepassxc/keepassxc"
mode: ugo+rx
become: true
# Nextcloud
- name: Make nextcloud dir
file:
path: "/opt/apps/nextcloud/"
state: directory
recurse: true
mode: ugo+rx
become: true
- name: Download Nextcloud
ansible.builtin.get_url:
url: https://github.com/nextcloud-releases/desktop/releases/download/v3.16.0/Nextcloud-3.16.0-x86_64.AppImage
dest: "/opt/apps/nextcloud/nextcloud"
mode: ugo+rx
become: true
# Discord
# - name: "Download Discord"
# ansible.builtin.get_url:
# url: https://discord.com/api/download?platform=linux&format=deb
# dest: "{{ tmp_dir }}/discord.deb"
# mode: ugo+r
# - name: "Install discord"
# ansible.builtin.apt:
# deb: "{{ tmp_dir }}/discord.deb"
# become: true
# Zoom
- name: Download zoom
ansible.builtin.get_url:
url: https://cdn.zoom.us/prod/6.3.6.6315/zoom_amd64.deb
dest: "{{ tmp_dir }}/zoom_amd64.deb"
mode: ugo+r
# - name: Copy Zoom
# copy:
# src: zoom_amd64.deb
# dest: "{{ tmp_dir }}/zoom_amd64.deb"
- name: "Install Zoom"
ansible.builtin.apt:
deb: "{{ tmp_dir }}/zoom_amd64.deb"
become: true
# dbeaver
- name: Download dbeaver
ansible.builtin.get_url:
url: https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb
dest: "{{ tmp_dir }}/dbeaver-ce_latest_amd64.deb"
mode: ugo+r
- name: "Install dbeaver"
ansible.builtin.apt:
deb: "{{ tmp_dir }}/dbeaver-ce_latest_amd64.deb"
become: true
# VeraCrypt
- name: Download VeraCrypt
ansible.builtin.get_url:
url: https://launchpad.net/veracrypt/trunk/1.26.20/+download/veracrypt-1.26.20-Ubuntu-24.04-amd64.deb
dest: "{{ tmp_dir }}/VeraCrypt.deb"
mode: ugo+r
- name: "Install VeraCrypt"
ansible.builtin.apt:
deb: "{{ tmp_dir }}/VeraCrypt.deb"
become: true
# ktalk
- name: Download ktalk
ansible.builtin.get_url:
url: https://st.ktalk.host/ktalk-app/linux/ktalk3.0.0amd64.deb
dest: "{{ tmp_dir }}/ktalk.deb"
mode: ugo+r
- name: "Install ktalk"
ansible.builtin.apt:
deb: "{{ tmp_dir }}/ktalk.deb"
become: true
# balenaEtcher
- name: Make balenaEtcher dir
file:
path: "/opt/apps/balenaEtcher/"
state: directory
recurse: true
mode: ugo+rx
become: true
- name: Download balenaEtcher
ansible.builtin.get_url:
url: https://github.com/balena-io/etcher/releases/download/v1.19.25/balenaEtcher-linux-x64-1.19.25.zip
dest: "/opt/apps/balenaEtcher/balenaEtcher.zip"
mode: ugo+r
become: true
- name: Unarchive balenaEtcher
ansible.builtin.unarchive:
src: /opt/apps/balenaEtcher/balenaEtcher.zip
dest: /opt/apps/balenaEtcher/
become: true
- name: Set permiton for directory
ansible.builtin.file:
path: /opt/apps/balenaEtcher/balenaEtcher-linux-x64
state: directory
mode: '0755'
become: true
# anydesk
- name: Download anydesk
ansible.builtin.get_url:
url: https://download.anydesk.com/linux/anydesk_6.3.3-1_amd64.deb
dest: "{{ tmp_dir }}/anydesk.deb"
mode: ugo+r
- name: "Install anydesk"
ansible.builtin.apt:
deb: "{{ tmp_dir }}/anydesk.deb"
become: true

View File

@ -0,0 +1,2 @@
localhost

View File

@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- apps

3
roles/apps/vars/main.yml Normal file
View File

@ -0,0 +1,3 @@
---
# vars file for apps
tmp_dir: /var/tmp