Add conditions everywhere.

This commit is contained in:
Glenn Y. Rolland 2016-02-17 01:05:02 +01:00
parent 5f0794bd0a
commit 01e5c05776
11 changed files with 74 additions and 47 deletions

View file

@ -1,8 +1,10 @@
---
# defaults file for glenux.basesystem
# basesystem_role: [workstation|server|laptop]
basesystem_role: workstation
# basesystem_arch: [i386|amd64|powerpc]
basesystem_arch: null
basesystem_gui: false
basesystem_task_desktop: false
basesystem_task_development: false
@ -13,4 +15,5 @@ basesystem_task_security: false
basesystem_task_shell: false
basesystem_task_shopping: false
basesystem_task_system: false
basesystem_task_shell: false

View file

@ -10,4 +10,5 @@
- x2goclient
- kde-plasma-desktop
- xserver-xorg-core
when: basesystem_task_desktop == true

View file

@ -1,9 +1,10 @@
---
- name: "Installing development utils"
- name: "Installing system development utils"
apt: >
name="{{item}}"
state=present
with_items:
- manpages-dev
- autoconf
- automake
- build-essential
@ -21,12 +22,6 @@
- subversion
- tmux
- vim
- vim-gtk
- kate
- kdevelop
- umbrello
- umlet
- xutils
- curl
- mercurial
- make
@ -35,7 +30,20 @@
- gcc-5
- gcc-5-multilib
- clang-3.8
when: basesystem_task_development == true
- name: "Installing desktop development utils"
apt: >
name="{{item}}"
state=present
with_items:
- umbrello
- umlet
- kdevelop
- vim-gtk
- kate
- xutils
when: basesystem_task_development == true && basesystem_task_desktop == true
- name: "Installing Haskell language"
apt: >
@ -63,6 +71,7 @@
- libghc-safe-dev
- libghc-uri-dev
- libghc-url-dev
when: basesystem_task_development == true
- name: "Installing Ruby language"
apt: >
@ -70,6 +79,7 @@
state=present
with_items:
- gem2deb
when: basesystem_task_development == true
- name: "Installing php5 language"
apt: >
@ -77,6 +87,7 @@
state=present
with_items:
- virtualenv
when: basesystem_task_development == true
- name: "Installing Rust language"
apt: >
@ -87,6 +98,7 @@
- rust-doc
- rust-gdb
- cargo
when: basesystem_task_development == true
- name: "Installing Go language"
apt: >
@ -94,6 +106,7 @@
state=present
with_items:
- golang
when: basesystem_task_development == true
- name: "Installing PHP language"
apt: >
@ -112,6 +125,7 @@
- php5-readline
- php5-tidy
- php5-xsl
when: basesystem_task_development == true
- name: "Installing development libraries"
apt: >
@ -129,4 +143,5 @@
- xutils-dev
- libsqlite3-dev
- libsqlite0-dev
when: basesystem_task_development == true

View file

@ -1,20 +1,5 @@
---
# Force yes no matter the value
- set_fact: basesystem_task_desktop=true
when: basesystem_role == 'workstation'
- set_fact: basesystem_task_multimedia=true
when: basesystem_role == 'workstation'
- set_fact: basesystem_task_office=true
when: basesystem_role == 'workstation'
- set_fact: basesystem_task_shopping=true
when: basesystem_role == 'workstation'
- set_fact: basesystem_task_development=false
when: basesystem_role == 'server'
- set_fact: basesystem_task_security=true
when: basesystem_role == 'server'
- template:
src=apt_conf_glenuxnet_base.j2
dest=/etc/apt/apt.conf.d/00glenuxnet_base
@ -32,6 +17,9 @@
- apt_repository: repo='deb http://ftp.fr.debian.org/debian/ unstable main contrib non-free' state=present
- apt_repository: repo='deb-src http://ftp.fr.debian.org/debian/ unstable main contrib non-free' state=present
- apt_repository: repo='deb http://ftp.fr.debian.org/debian/ experimental main contrib non-free' state=present
- apt_repository: repo='deb-src http://ftp.fr.debian.org/debian/ experimental main contrib non-free' state=present
# Debian security
- apt_repository: repo='deb http://security.debian.org/ stable/updates main contrib non-free' state=present
- apt_repository: repo='deb-src http://security.debian.org/ stable/updates main contrib non-free' state=present
@ -45,19 +33,10 @@
- include: system.yml
- include: desktop.yml
when: basesystem_task_desktop == true
- include: shopping.yml
when: basesystem_task_shopping == true
- include: multimedia.yml
when: basesystem_task_multimedia == true
- include: development.yml
when: basesystem_task_development == true
- include: network.yml
when: basesystem_task_network == true
- include: office.yml
when: basesystem_task_office == true
- include: security.yml
when: basesystem_task_security == true
- include: shell.yml
when: basesystem_task_shell == true

View file

@ -1,5 +1,14 @@
---
- name: "Installing multimedia tools"
- name: "Installing desktop multimedia tools"
apt: >
name="{{item}}"
state=present
with_items:
- transcode
- ffmpeg
when: basesystem_task_multimedia == true
- name: "Installing desktop multimedia tools"
apt: >
name="{{item}}"
state=present
@ -7,8 +16,7 @@
- mpv
- mplayer
- vlc
- transcode
- ffmpeg
- flashplugin-nonfree
- pepperflashplugin-nonfree
when: basesystem_task_multimedia == true && basesystem_task_desktop == true

View file

@ -1,11 +1,17 @@
---
- name: "Installing network tools"
- name: "Installing system network tools"
apt: >
name="{{item}}"
state=present
with_items:
- nmap
- wireshark
- manpages-dev
- vlan
when: basesystem_task_network == true
- name: "Installing desktop tools"
apt: >
name="{{item}}"
state=present
with_items:
- wireshark
when: basesystem_task_network == true && basesystem_task_desktop == true

View file

@ -8,6 +8,7 @@
- libreoffice
- lyx
- ttf-mscorefonts-installer
when: basesystem_task_desktop == true && basesystem_task_office == true
- name: "Installing office/image utils"
apt: >
@ -18,6 +19,8 @@
- geeqie
- gwenview
- inkscape
- okular
when: basesystem_task_desktop == true && basesystem_task_office == true
- name: "Installing office/communication tools"
apt: >
@ -29,4 +32,5 @@
- chromium
- psi-plus
- mutt
when: basesystem_task_desktop == true && basesystem_task_office == true

View file

@ -1,5 +1,5 @@
---
- name: "Installing security tools"
- name: "Installing system security tools"
apt: >
name="{{item}}"
state=present
@ -7,15 +7,23 @@
- bruteforce-luks # system & security
- encfs # system & security
- encfs # system & security
- cryptkeeper # desktop & security
- cryptmount # desktop & security
- cryptsetup # system & security
- cryptsetup-bin # system & security
- libpam-encfs # system & security
- keepassx # desktop & security
- kpcli # ?? & security
- pwgen # ?? & security
- openvpn # system or desktop and security
- network-manager-openvpn # desktop & security
- easy-rsa # system & security
when: basesystem_task_security == true
- name: "Installing desktop security tools"
apt: >
name="{{item}}"
state=present
with_items:
- cryptkeeper # desktop & security
- cryptmount # desktop & security
- network-manager-openvpn # desktop & security
- keepassx # desktop & security
- kpcli # desktop ?? & security
- pwgen # desktop & security
when: basesystem_task_desktop == true && basesystem_task_security == true

View file

@ -4,9 +4,11 @@
repo=https://github.com/clvv/fasd.git
dest=/usr/local/fasd
version=master
when: basesystem_task_shell == true
- command: make install
args:
chdir: /usr/local/fasd
#creates:
when: basesystem_task_shell == true

View file

@ -5,4 +5,4 @@
state=present
with_items:
- esniper
when: basesystem_task_shopping == true

View file

@ -8,5 +8,6 @@
- lshw
- slay
- unrar
- p7zip-full