From 5f0794bd0ab172f833a3d9a65772fb5ed2b3052e Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Tue, 16 Feb 2016 21:31:42 +0100 Subject: [PATCH] Added task system. --- defaults/main.yml | 14 ++++++++++++++ tasks/main.yml | 36 +++++++++++++++++++++++++++--------- 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index cc060fa..9cad3bb 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,16 @@ --- # defaults file for glenux.basesystem +basesystem_role: workstation +basesystem_arch: null +basesystem_gui: false + +basesystem_task_desktop: false +basesystem_task_development: false +basesystem_task_multimedia: false +basesystem_task_network: false +basesystem_task_office: false +basesystem_task_security: false +basesystem_task_shell: false +basesystem_task_shopping: false +basesystem_task_system: false + diff --git a/tasks/main.yml b/tasks/main.yml index ebcfbb5..5812be2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,20 @@ --- +# 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 @@ -9,37 +24,40 @@ # Debian normal - apt_repository: repo='deb http://ftp.fr.debian.org/debian/ stable main contrib non-free' state=present - notify: ['Update APT cache'] - apt_repository: repo='deb-src http://ftp.fr.debian.org/debian/ stable main contrib non-free' state=present - notify: ['Update APT cache'] - apt_repository: repo='deb http://ftp.fr.debian.org/debian/ testing main contrib non-free' state=present - notify: ['Update APT cache'] - apt_repository: repo='deb-src http://ftp.fr.debian.org/debian/ testing main contrib non-free' state=present - notify: ['Update APT cache'] - apt_repository: repo='deb http://ftp.fr.debian.org/debian/ unstable main contrib non-free' state=present - notify: ['Update APT cache'] - apt_repository: repo='deb-src http://ftp.fr.debian.org/debian/ unstable main contrib non-free' state=present - notify: ['Update APT cache'] # Debian security - apt_repository: repo='deb http://security.debian.org/ stable/updates main contrib non-free' state=present - notify: ['Update APT cache'] - apt_repository: repo='deb-src http://security.debian.org/ stable/updates main contrib non-free' state=present - notify: ['Update APT cache'] # Debian stable-update (ex-volatile) - apt_repository: repo='deb http://ftp.fr.debian.org/debian/ stable-updates main contrib non-free' state=present - apt_repository: repo='deb-src http://ftp.fr.debian.org/debian/ stable-updates main contrib non-free' state=present +- command: /bin/true + notify: ['Update APT cache'] + - include: system.yml - include: desktop.yml + when: basesystem_task_desktop == true - include: shopping.yml -- include: development.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