From 576b301e9c4b0441f19e9d237553e709f8f147db Mon Sep 17 00:00:00 2001 From: vincent Date: Wed, 18 Sep 2019 23:14:11 +0200 Subject: [PATCH] adaptation roles syteme debian --- defaults/main.yml | 32 +++++++++++++++++++++++++++++++- tasks/base_software.yml | 11 ++++++++++- tasks/depot_debian.yml | 6 ++++++ tasks/main.yml | 6 +++++- 4 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 tasks/depot_debian.yml diff --git a/defaults/main.yml b/defaults/main.yml index 646ee2d..6f6c30b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,7 +11,7 @@ time: hwclock: UTC timezone: Europe/Paris -system_base_softwares: +system_base_softwares_arch: - 'zsh' - 'stow' - 'wol' @@ -41,3 +41,33 @@ system_base_softwares: - 'unzip' - 'unrar' - 'git-lfs' + +system_base_softwares_debian: + - 'zsh' + - 'stow' + #- 'wol' + - 'nmap' + #- 'bind-tools' + - 'rsync' + #- 'awesome-terminal-fonts' + - 'wget' + #- 'bat' + #- 'diff-so-fancy' + - 'git' + - 'htop' + - 'thefuck' + - 'tldr' + - 'ntfs-3g' + - 'python-lxml' + - 'tmux' + - 'vim' + - 'zsh-theme-powerlevel9k' + - 'python-pip' + - 'yarn' + - 'npm' + - 'nethogs' + - 'iftop' + - 'zip' + - 'unzip' + - 'unrar' + - 'git-lfs' \ No newline at end of file diff --git a/tasks/base_software.yml b/tasks/base_software.yml index 65f90c0..1720c85 100644 --- a/tasks/base_software.yml +++ b/tasks/base_software.yml @@ -19,8 +19,17 @@ - name: launch base install software pacman: state: present # not required. choices: absent;latest;present. Desired state of the package. - name: "{{system_base_softwares}}" + name: "{{system_base_softwares_arch}}" become: yes + when: ansible_facts['os_family'] == "Archlinux" + + +- name: launch base install software + apt: + state: present # not required. choices: absent;latest;present. Desired state of the package. + name: "{{system_base_softwares_debian}}" + become: yes + when: ansible_facts['os_family'] == "Debian" - name: install powerline status via pip pip: diff --git a/tasks/depot_debian.yml b/tasks/depot_debian.yml new file mode 100644 index 0000000..dc30576 --- /dev/null +++ b/tasks/depot_debian.yml @@ -0,0 +1,6 @@ +- name: add repo main contrib + apt_repository: + repo: deb http://ftp.fr.debian.org/debian/ stable main contrib non-free + state: present # not required. choices: absent;present. A source string state. + update_cache: yes # not required. Run the equivalent of C(apt-get update) when a change occurs. Cache updates are run after making changes. + become: yes \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index bbd5ba2..34bbfaa 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,7 +1,11 @@ ---- - include_tasks: hostname.yml - include_tasks: locales.yml - include_tasks: time.yml - include_tasks: pacman.yml + when: ansible_facts['os_family'] == "Archlinux" +- include_tasks: depot_debian.yml + when: ansible_facts['os_family'] == "Debian" - include_tasks: AUR_builder.yml + when: ansible_facts['os_family'] == "Archlinux" + - include_tasks: base_software.yml \ No newline at end of file