Add role common
parent
c5288bdb4d
commit
e7b0549468
@ -0,0 +1,2 @@
|
||||
- name: reload_sysctl
|
||||
command: sysctl --system
|
@ -0,0 +1,20 @@
|
||||
- name: General aliases
|
||||
blockinfile:
|
||||
path: "{{ ansible_facts.env.HOME }}/.bashrc"
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK | General aliases"
|
||||
block: |
|
||||
alias clr="clear"
|
||||
alias hgrep="history | grep"
|
||||
alias syslog="tail -f --lines=100 /var/log/syslog"
|
||||
alias cp="rsync -hlAXEptgoDS --numeric-ids --info=progress2"
|
||||
|
||||
- name: ls aliases and colors
|
||||
blockinfile:
|
||||
path: "{{ ansible_facts.env.HOME }}/.bashrc"
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK | ls aliases and colors"
|
||||
block: |
|
||||
export LS_OPTIONS='--color=auto'
|
||||
eval "`dircolors`"
|
||||
alias ls='ls $LS_OPTIONS'
|
||||
alias ll='ls $LS_OPTIONS -l'
|
||||
alias l='ls $LS_OPTIONS -la'
|
@ -0,0 +1,7 @@
|
||||
- import_tasks: ./packages.yml
|
||||
|
||||
- import_tasks: ./ssh.yml
|
||||
|
||||
- import_tasks: ./packages.yml
|
||||
|
||||
- import_tasks: ./aliases.yml
|
@ -0,0 +1,20 @@
|
||||
- name: Update Packages
|
||||
apt:
|
||||
update_cache: yes
|
||||
upgrade: yes
|
||||
when: ansible_facts.distribution == "Debian"
|
||||
|
||||
- name: Install Packages
|
||||
package:
|
||||
name:
|
||||
- gpg
|
||||
- htop
|
||||
- iotop
|
||||
- slurm
|
||||
- sudo
|
||||
- screen
|
||||
- curl
|
||||
- rsync
|
||||
- zstd
|
||||
state: latest
|
||||
when: ansible_facts.distribution == "Debian"
|
@ -0,0 +1,12 @@
|
||||
- name: Disable SSH password auth
|
||||
lineinfile:
|
||||
dest: /etc/ssh/sshd_config
|
||||
regexp: '^PasswordAuthentication\s*yes'
|
||||
line: "PasswordAuthentication no"
|
||||
register: sshd_config
|
||||
|
||||
- name: Restart SSH daemon
|
||||
service:
|
||||
name: sshd
|
||||
state: restarted
|
||||
when: sshd_config.changed
|
Loading…
Reference in New Issue