forked from HawksRepos/PTS-Team
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common update ansible
- Loading branch information
MrDoobPG
authored and
MrDoobPG
committed
Aug 25, 2019
1 parent
13aa5f8
commit 281da75
Showing
4 changed files
with
153 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[global] | ||
disable-pip-version-check = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
######################################################################### | ||
# Title: Cloudbox: Common Role # | ||
# Author(s): l3uddz, desimaniac # | ||
# URL: https://github.com/cloudbox/cloudbox # | ||
# -- # | ||
# Part of the Cloudbox project: https://cloudbox.works # | ||
######################################################################### | ||
# GNU General Public License v3.0 # | ||
######################################################################### | ||
--- | ||
- name: Install required packages | ||
apt: | ||
state: present | ||
name: | ||
- apt-transport-https | ||
- ca-certificates | ||
- software-properties-common | ||
|
||
- name: Add Ubuntu repositories | ||
apt_repository: | ||
repo: "{{ item }}" | ||
state: present | ||
update_cache: yes | ||
with_items: | ||
- 'deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} multiverse' | ||
- 'deb-src http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} multiverse' | ||
- 'deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates multiverse' | ||
- 'deb-src http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates multiverse' | ||
when: ansible_distribution == 'Ubuntu' | ||
|
||
- name: Add Debian repositories | ||
apt_repository: | ||
repo: "{{ item }}" | ||
state: present | ||
update_cache: yes | ||
with_items: | ||
- deb https://deb.debian.org/debian {{ ansible_distribution_release }} main contrib non-free | ||
- deb-src https://deb.debian.org/debian {{ ansible_distribution_release }} main contrib non-free | ||
- deb https://deb.debian.org/debian-security/ {{ ansible_distribution_release }}/updates main contrib non-free | ||
- deb-src https://deb.debian.org/debian-security/ {{ ansible_distribution_release }}/updates main contrib non-free | ||
- deb https://deb.debian.org/debian {{ ansible_distribution_release }}-updates main contrib non-free | ||
- deb-src https://deb.debian.org/debian {{ ansible_distribution_release }}-updates main contrib non-free | ||
- deb https://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib non-free | ||
- deb-src https://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib non-free | ||
when: ansible_distribution == 'Debian' | ||
|
||
- name: Fetch pci info | ||
shell: "lspci -v -s $(lspci | grep -E '.*VGA.*Intel.*' | cut -d' ' -f 1) 2>/dev/null || :" | ||
register: lscpi_resp | ||
|
||
- name: Install common packages | ||
apt: | ||
state: present | ||
name: | ||
- "nano" | ||
- "zip" | ||
- "unzip" | ||
- "p7zip" | ||
- "curl" | ||
- "httpie" | ||
- "sqlite3" | ||
- "tree" | ||
- "lsof" | ||
- "man-db" | ||
- "ksmtuned" | ||
- "git" | ||
- "pwgen" | ||
- "rsync" | ||
- "logrotate" | ||
- "htop" | ||
- "iotop" | ||
- "nload" | ||
- "fail2ban" | ||
- "ufw" | ||
- "ncdu" | ||
- "mc" | ||
- "speedtest-cli" | ||
- "dnsutils" | ||
- "screen" | ||
- "tmux" | ||
- "apache2-utils" | ||
- "jq" | ||
- "lib32z1" | ||
ignore_errors: yes | ||
|
||
- name: Install extra packages | ||
apt: | ||
state: present | ||
name: | ||
- "run-one" | ||
ignore_errors: yes | ||
|
||
- name: Install 'intel-gpu-tools' | ||
apt: "name=intel-gpu-tools state=present" | ||
when: ('i915' not in lscpi_resp.stdout) | ||
|
||
- name: Install unrar | ||
apt: | ||
name: unrar | ||
state: present | ||
ignore_errors: yes | ||
|
||
- name: Check to see if unrar installed | ||
stat: | ||
path: "/usr/bin/unrar" | ||
register: unrar_binary | ||
|
||
- name: Install unrar-free if unrar was not installed | ||
apt: | ||
name: unrar-free | ||
state: present | ||
ignore_errors: yes | ||
when: (not unrar_binary.stat.exists) | ||
|
||
- name: "Import pip.conf into /home/{{ user.name }}/.config/pip/pip.conf" | ||
copy: | ||
src: "pip.conf" | ||
dest: "/home/{{ user.name }}/.config/pip/pip.conf" | ||
owner: "{{ user.name }}" | ||
group: "{{ user.name }}" | ||
mode: 0775 | ||
force: yes | ||
|
||
- name: Install common pip modules | ||
pip: | ||
state: present | ||
name: | ||
- passlib | ||
- certbot | ||
- ansible-toolbox | ||
- ndg-httpsclient | ||
- dnspython | ||
- yq | ||
- lxml | ||
- apprise | ||
- jmespath | ||
ignore_errors: yes | ||
|
||
- name: Uninstall apt glances | ||
apt: | ||
name: glances | ||
state: absent | ||
ignore_errors: yes | ||
tags: glances | ||
|
||
- name: Install pip glances | ||
shell: pip install glances[action,browser,cloud,cpuinfo,docker,folders,gpu,graph,ip,raid,snmp,web] | ||
tags: glances |