mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-10-27 02:34:43 +00:00
Compare commits
1 commit
8069200e53
...
a32035c157
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a32035c157 |
1 changed files with 57 additions and 2 deletions
|
|
@ -145,6 +145,32 @@
|
||||||
- "Raspbian"
|
- "Raspbian"
|
||||||
- "Ubuntu"
|
- "Ubuntu"
|
||||||
|
|
||||||
|
- name: Install exa (Debian, Raspbian, Ubuntu)
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- exa
|
||||||
|
state: latest
|
||||||
|
update_cache: yes
|
||||||
|
register: exa_install_result
|
||||||
|
ignore_errors: yes
|
||||||
|
when: ansible_distribution in ["Debian", "Raspbian", "Ubuntu"]
|
||||||
|
tags:
|
||||||
|
- "Debian"
|
||||||
|
- "Raspbian"
|
||||||
|
- "Ubuntu"
|
||||||
|
|
||||||
|
- name: Install eza (if exa failed)
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- eza
|
||||||
|
state: latest
|
||||||
|
update_cache: yes
|
||||||
|
when: exa_install_result is failed
|
||||||
|
tags:
|
||||||
|
- "Debian"
|
||||||
|
- "Raspbian"
|
||||||
|
- "Ubuntu"
|
||||||
|
|
||||||
- name: Install grc from remote repo (AlmaLinux, Rocky)
|
- name: Install grc from remote repo (AlmaLinux, Rocky)
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
name: 'https://github.com/kriipke/grc/releases/download/1.13.8/grc-1.13.8-1.el7.noarch.rpm'
|
name: 'https://github.com/kriipke/grc/releases/download/1.13.8/grc-1.13.8-1.el7.noarch.rpm'
|
||||||
|
|
@ -163,6 +189,7 @@
|
||||||
- cracklib
|
- cracklib
|
||||||
- curl
|
- curl
|
||||||
- dnf-plugins-core
|
- dnf-plugins-core
|
||||||
|
- exa
|
||||||
- git
|
- git
|
||||||
- grc
|
- grc
|
||||||
- htop
|
- htop
|
||||||
|
|
@ -173,6 +200,7 @@
|
||||||
- wget
|
- wget
|
||||||
state: latest
|
state: latest
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
register: exa_install_result
|
||||||
when: ansible_distribution in ["AlmaLinux", "Rocky"]
|
when: ansible_distribution in ["AlmaLinux", "Rocky"]
|
||||||
tags:
|
tags:
|
||||||
- "AlmaLinux"
|
- "AlmaLinux"
|
||||||
|
|
@ -197,6 +225,7 @@
|
||||||
- cronie
|
- cronie
|
||||||
- curl
|
- curl
|
||||||
- dnf-plugins-core
|
- dnf-plugins-core
|
||||||
|
- exa
|
||||||
- git
|
- git
|
||||||
- grc
|
- grc
|
||||||
- htop
|
- htop
|
||||||
|
|
@ -207,6 +236,7 @@
|
||||||
- wget
|
- wget
|
||||||
state: latest
|
state: latest
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
register: exa_install_result
|
||||||
when: ansible_distribution in ["Fedora"]
|
when: ansible_distribution in ["Fedora"]
|
||||||
tags:
|
tags:
|
||||||
- "Fedora"
|
- "Fedora"
|
||||||
|
|
@ -234,6 +264,7 @@
|
||||||
- ca-certificates
|
- ca-certificates
|
||||||
- cracklib
|
- cracklib
|
||||||
- curl
|
- curl
|
||||||
|
- exa
|
||||||
- git
|
- git
|
||||||
- grc
|
- grc
|
||||||
- htop
|
- htop
|
||||||
|
|
@ -241,6 +272,7 @@
|
||||||
- wget
|
- wget
|
||||||
state: latest
|
state: latest
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
register: exa_install_result
|
||||||
when: ansible_distribution in ["openSUSE Tumbleweed"]
|
when: ansible_distribution in ["openSUSE Tumbleweed"]
|
||||||
tags:
|
tags:
|
||||||
- "openSUSE Tumbleweed"
|
- "openSUSE Tumbleweed"
|
||||||
|
|
@ -697,7 +729,7 @@
|
||||||
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
||||||
failed_when: ansible_user_id == "root"
|
failed_when: ansible_user_id == "root"
|
||||||
|
|
||||||
- name: Add aliases (All)
|
- name: Add aliases with exa (All)
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: ~/.bashrc
|
path: ~/.bashrc
|
||||||
block: |
|
block: |
|
||||||
|
|
@ -705,10 +737,13 @@
|
||||||
alias dpsw='watch -c bash -ic dps'
|
alias dpsw='watch -c bash -ic dps'
|
||||||
alias mi='micro'
|
alias mi='micro'
|
||||||
alias sudo='sudo '
|
alias sudo='sudo '
|
||||||
|
alias ls='exa'
|
||||||
|
alias ll='exa -hlg'
|
||||||
|
alias la='exa -hlag'
|
||||||
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
||||||
insertafter: EOF
|
insertafter: EOF
|
||||||
state: present
|
state: present
|
||||||
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
when: exa_install_result is succeeded and ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
||||||
tags:
|
tags:
|
||||||
- "AlmaLinux"
|
- "AlmaLinux"
|
||||||
- "Debian"
|
- "Debian"
|
||||||
|
|
@ -718,6 +753,26 @@
|
||||||
- "Rocky"
|
- "Rocky"
|
||||||
- "Ubuntu"
|
- "Ubuntu"
|
||||||
|
|
||||||
|
- name: Add aliases with eza (Debian, Raspbian, Ubuntu)
|
||||||
|
blockinfile:
|
||||||
|
path: ~/.bashrc
|
||||||
|
block: |
|
||||||
|
alias dps='grc --colour=on docker ps -f status=running -f status=exited --format "table {{'{{'}}.Names{{'}}'}}\\t{{'{{'}}.Status{{'}}'}}\\t{{'{{'}}.Ports{{'}}'}}" | sort'
|
||||||
|
alias dpsw='watch -c bash -ic dps'
|
||||||
|
alias mi='micro'
|
||||||
|
alias sudo='sudo '
|
||||||
|
alias ls='eza'
|
||||||
|
alias ll='eza -hlg'
|
||||||
|
alias la='eza -hlag'
|
||||||
|
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
||||||
|
insertafter: EOF
|
||||||
|
state: present
|
||||||
|
when: exa_install_result is failed and ansible_distribution in ["Debian", "Raspbian", "Ubuntu"]
|
||||||
|
tags:
|
||||||
|
- "Debian"
|
||||||
|
- "Raspbian"
|
||||||
|
- "Ubuntu"
|
||||||
|
|
||||||
- name: Clone / Update T-Pot repository (All)
|
- name: Clone / Update T-Pot repository (All)
|
||||||
git:
|
git:
|
||||||
repo: 'https://github.com/telekom-security/tpotce'
|
repo: 'https://github.com/telekom-security/tpotce'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue