Compare commits
14 Commits
469550c6a6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 674675585e | |||
| b848d69be1 | |||
| dee1264765 | |||
| fd0271e10e | |||
| 634a8f488b | |||
| ccd8032205 | |||
| 5c32eda240 | |||
| 735094b5d2 | |||
| 5167735b5b | |||
| e919ce2524 | |||
| 44fc5f0e28 | |||
| 0c6170483b | |||
| 197064f459 | |||
| bf7e11e50e |
@@ -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"
|
|
||||||
|
|||||||
107
local.yml
107
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,20 +14,61 @@
|
|||||||
- username: gianm
|
- username: gianm
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Set zsh main as shell
|
- name: Creates temporary directory
|
||||||
|
file:
|
||||||
|
path: "{{ tmp_dir }}"
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- 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: 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: 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
|
||||||
|
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
|
||||||
|
when: ansible_user_shell == "/bin/bash"
|
||||||
|
|
||||||
- name: check if on my zsh is installed
|
- name: check if on my zsh is installed
|
||||||
stat:
|
stat:
|
||||||
@@ -33,29 +80,43 @@
|
|||||||
msg: "skipping install oh my zsh"
|
msg: "skipping install oh my zsh"
|
||||||
when: zsh_dir.stat.exists
|
when: zsh_dir.stat.exists
|
||||||
|
|
||||||
- name: install oh my zsh
|
- name: Install oh my zsh
|
||||||
become: true
|
|
||||||
become_user: gianm
|
become_user: gianm
|
||||||
when: not zsh_dir.stat.exists
|
git:
|
||||||
shell: sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
|
repo: https://github.com/ohmyzsh/ohmyzsh.git
|
||||||
|
version: 'latest'
|
||||||
|
dest: ~/.oh-my-zsh
|
||||||
|
depth: 1
|
||||||
|
|
||||||
- name: Setup .zshrc
|
- name: Setup .zshrc
|
||||||
|
become_user: gianm
|
||||||
copy:
|
copy:
|
||||||
src: files/zshrc
|
src: files/zshrc
|
||||||
dest: /home/gianm/.zshrc
|
dest: ~/.zshrc
|
||||||
owner: gianm
|
mode: 0644
|
||||||
group: gianm
|
|
||||||
|
|
||||||
- name: Setups .profile
|
- name: Setup .profile
|
||||||
|
become_user: gianm
|
||||||
copy:
|
copy:
|
||||||
src: files/profile
|
src: files/profile
|
||||||
dest: /home/gianm/.profile
|
dest: ~/.profile
|
||||||
owner: gianm
|
mode: 0644
|
||||||
group: gianm
|
|
||||||
|
|
||||||
- name: install nvm
|
- name: create local dir for node packages
|
||||||
become: true
|
|
||||||
become_user: gianm
|
become_user: gianm
|
||||||
shell: zsh -c "$(wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh -O -)"
|
file:
|
||||||
args:
|
path: ~/.npm-global
|
||||||
creates: "{{ ansible_env.HOME }}/.nvm/nvm.sh"
|
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
|
||||||
4
setup.sh
4
setup.sh
@@ -1,6 +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
|
ansible-pull -U https://git.jatus.tech/Jatus/workstation-setup.git -K --ask-vault-pass
|
||||||
zsh
|
|
||||||
nvm install --lts
|
|
||||||
2
vars/packages.yml
Normal file
2
vars/packages.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
packages: ["zsh", "yadm", "nodejs","firefox","chromium","telegram-desktop"]
|
||||||
Reference in New Issue
Block a user