Compare commits
3 Commits
ccd8032205
...
dee1264765
Author | SHA1 | Date | |
---|---|---|---|
dee1264765 | |||
fd0271e10e | |||
634a8f488b |
29
discord_install.yml
Normal file
29
discord_install.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
- hosts: localhost
|
||||||
|
connection: local
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
vars:
|
||||||
|
discord_url: https://discordapp.com/api/download?format=deb&platform=linux
|
||||||
|
discord_tmp: /tmp/discord
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: DISCORD - Creates temporary directory
|
||||||
|
file:
|
||||||
|
path: "{{ discord_tmp }}"
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: DISCORD - Download discord
|
||||||
|
get_url:
|
||||||
|
url: "{{ discord_url }}"
|
||||||
|
dest: "{{ discord_tmp }}/discord.deb"
|
||||||
|
force: yes
|
||||||
|
|
||||||
|
- name: DISCORD - Install my_package
|
||||||
|
apt:
|
||||||
|
deb: "{{ discord_tmp }}/discord.deb"
|
||||||
|
|
||||||
|
- name: DISCORD - Remove temporary directory
|
||||||
|
file:
|
||||||
|
path: "{{ discord_tmp }}"
|
||||||
|
state: absent
|
@ -101,6 +101,3 @@ source $ZSH/oh-my-zsh.sh
|
|||||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||||
|
|
||||||
source ~/.profile
|
source ~/.profile
|
||||||
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
|
||||||
export SDKMAN_DIR="$HOME/.sdkman"
|
|
||||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
|
||||||
|
91
local.yml
91
local.yml
@ -1,6 +1,12 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
|
become: true
|
||||||
connection: local
|
connection: local
|
||||||
|
vars_files:
|
||||||
|
- vars/packages.yml
|
||||||
|
vars:
|
||||||
|
tmp_dir: /tmp-ansibe
|
||||||
|
discord_url: https://discordapp.com/api/download?format=deb&platform=linux
|
||||||
roles:
|
roles:
|
||||||
- role: gantsign.visual-studio-code
|
- role: gantsign.visual-studio-code
|
||||||
become: true
|
become: true
|
||||||
@ -8,25 +14,60 @@
|
|||||||
- username: gianm
|
- username: gianm
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: add to repository nodejs
|
- name: Creates temporary directory
|
||||||
become: true
|
file:
|
||||||
shell: curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
|
path: "{{ tmp_dir }}"
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: Set zsh main as shell
|
- name: get script to add repository nodejs
|
||||||
become: true
|
become: true
|
||||||
when: ansible_facts['os_family'] == "Debian"
|
when: ansible_facts['os_family'] == "Debian"
|
||||||
shell: apt update
|
get_url:
|
||||||
|
url: "https://deb.nodesource.com/setup_lts.x"
|
||||||
|
dest: "{{ tmp_dir }}/node-add.sh"
|
||||||
|
mode: '774'
|
||||||
|
|
||||||
|
- name: execute scritp to add repository nodejs
|
||||||
|
become: true
|
||||||
|
when: ansible_facts['os_family'] == "Debian"
|
||||||
|
command: "{{ tmp_dir }}/node-add.sh"
|
||||||
|
register: source_added
|
||||||
|
changed_when: source_added.rc != 0
|
||||||
|
|
||||||
- name: Basic dev install
|
- name: execute scritp to add repository nodejs
|
||||||
|
become: true
|
||||||
|
when: ansible_facts['os_family'] == "Debian"
|
||||||
|
command: "{{ tmp_dir }}/node-add.sh"
|
||||||
|
register: source_added
|
||||||
|
changed_when: source_added.rc != 0
|
||||||
|
|
||||||
|
- name: DISCORD - Download discord
|
||||||
|
get_url:
|
||||||
|
url: "{{ discord_url }}"
|
||||||
|
dest: "{{ tmp_dir }}/discord.deb"
|
||||||
|
force: yes
|
||||||
|
|
||||||
|
- name: DISCORD - Install my_package
|
||||||
|
apt:
|
||||||
|
deb: "{{ tmp_dir }}/discord.deb"
|
||||||
|
|
||||||
|
- name: Update apt repository
|
||||||
|
become: true
|
||||||
|
when: ansible_facts['os_family'] == "Debian"
|
||||||
|
command: apt update
|
||||||
|
|
||||||
|
- name: Installing {{ packages }}
|
||||||
become: true
|
become: true
|
||||||
package:
|
package:
|
||||||
name:
|
name: "{{ item }}"
|
||||||
- zsh
|
state: present
|
||||||
- nodejs
|
with_items: "{{ packages }}"
|
||||||
|
|
||||||
- name: Set zsh main as shell
|
- name: Set zsh main as command
|
||||||
become: true
|
become: true
|
||||||
shell: chsh -s $(which zsh) gianm
|
command: chsh -s $(which zsh) gianm
|
||||||
|
register: shell_change
|
||||||
|
changed_when: shell_change.rc != 0
|
||||||
|
|
||||||
- name: check if on my zsh is installed
|
- name: check if on my zsh is installed
|
||||||
stat:
|
stat:
|
||||||
@ -42,6 +83,7 @@
|
|||||||
become_user: gianm
|
become_user: gianm
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/ohmyzsh/ohmyzsh.git
|
repo: https://github.com/ohmyzsh/ohmyzsh.git
|
||||||
|
version: 'latest'
|
||||||
dest: ~/.oh-my-zsh
|
dest: ~/.oh-my-zsh
|
||||||
depth: 1
|
depth: 1
|
||||||
|
|
||||||
@ -59,6 +101,27 @@
|
|||||||
dest: ~/.profile
|
dest: ~/.profile
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
- name: Setup .profile
|
- name: create local dir for node packages
|
||||||
become: true
|
become_user: gianm
|
||||||
shell: reboot
|
file:
|
||||||
|
path: ~/.npm-global
|
||||||
|
state: directory
|
||||||
|
owner: gianm
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: EACCESS fix
|
||||||
|
become_user: gianm
|
||||||
|
command: npm config set prefix '~/.npm-global'
|
||||||
|
register: updated_npm
|
||||||
|
changed_when: updated_npm.rc != 0
|
||||||
|
|
||||||
|
- name: Remove temporary directory
|
||||||
|
file:
|
||||||
|
path: "{{ tmp_dir }}"
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
# - name: Setup done rebooting
|
||||||
|
# become: true
|
||||||
|
# command: reboot
|
||||||
|
# register: rebooting
|
||||||
|
# changed_when: rebooting.rc != 0
|
2
setup.sh
2
setup.sh
@ -1,4 +1,4 @@
|
|||||||
#! bin/bash
|
#! bin/bash
|
||||||
wget https://git.jatus.tech/Jatus/workstation-setup/raw/branch/main/requirments.yml
|
wget https://git.jatus.tech/Jatus/workstation-setup/raw/branch/main/requirments.yml
|
||||||
ansible-galaxy install -r requirments.yml
|
ansible-galaxy install -r requirments.yml
|
||||||
ansible-pull -U https://git.jatus.tech/Jatus/workstation-setup.git -K
|
ansible-pull -U https://git.jatus.tech/Jatus/workstation-setup.git -K --ask-vault-pass
|
2
vars/packages.yml
Normal file
2
vars/packages.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
packages: ["zsh", "yadm", "nodejs","firefox","chromium"]
|
Loading…
Reference in New Issue
Block a user