diff options
author | Quentin <quentin@dufour.io> | 2021-04-09 11:19:38 +0200 |
---|---|---|
committer | Quentin <quentin@dufour.io> | 2021-04-09 11:19:38 +0200 |
commit | f4c8ba8ebd076fd46439289993155274be7605c4 (patch) | |
tree | 3266239bd7cd8c8a03093736c8325bee58cb614c /os/config/roles/common/tasks/main.yml | |
parent | 0b4c61dfe1102519157b8f8896a779fa9343a743 (diff) | |
parent | 89b87407818c78852b2c99b4300053e34e255fa5 (diff) | |
download | infrastructure-f4c8ba8ebd076fd46439289993155274be7605c4.tar.gz infrastructure-f4c8ba8ebd076fd46439289993155274be7605c4.zip |
Merge pull request 'Config Ansible mise à jour à l'occasion de l'install de HammerHead' (#37) from adrien/infrastructure:main into feature/upgrade-ansible
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/infrastructure/pulls/37
Diffstat (limited to 'os/config/roles/common/tasks/main.yml')
-rw-r--r-- | os/config/roles/common/tasks/main.yml | 78 |
1 files changed, 56 insertions, 22 deletions
diff --git a/os/config/roles/common/tasks/main.yml b/os/config/roles/common/tasks/main.yml index 3898c8f..b332414 100644 --- a/os/config/roles/common/tasks/main.yml +++ b/os/config/roles/common/tasks/main.yml @@ -15,39 +15,73 @@ - name: "Install base tools" apt: name: - - vim - - htop - - screen - - iptables - - iptables-persistent - - nftables - - iproute2 + # Essentials - curl - - iputils-ping - - dnsutils + - less + - sudo + - tar + - unzip + # User tooling + - screen + - vim + # Monitoring - bmon + - htop - iftop - iotop - - docker.io - - unzip - - tar - - tcpdump - - less - - parted - - btrfs-tools - - libnss-resolve - - net-tools + - iputils-ping + - pciutils - strace - - sudo + - tcpdump + # Networking + - dnsutils # now called bind9-dnsutils (still valid) - ethtool - - pciutils + - iproute2 # advanced net-tools + - iptables # legacy firewall (still used by diplonat) + - iptables-persistent + - net-tools # basic network tools + - nftables # iptables' successor (will replace it eventually) + # Optional / Dispensable + #- docker.io # Adrien n'approuve pas (il faut utiliser le repo Docker) + - parted + #- btrfs-tools + #- libnss-resolve # provides DNS/LLMNR utilities via systemd-resolved state: present +# Install Docker if need be + +- name: Check if Docker is installed + command: 'which docker' + args: + warn: no + register: docker_exists + changed_when: docker_exists.rc != 0 + ignore_errors: true + +- name: "Install Docker" + include_tasks: docker.yml + when: docker_exists.rc != 0 + +# Install Nomad & Consul if need be + +- name: Check if Nomad is installed + command: 'which nomad' + args: + warn: no + register: nomad_exists + changed_when: nomad_exists.rc != 0 + ignore_errors: true + +- name: "Install Nomad & Consul" + include_tasks: hashicorp.yml + when: nomad_exists.rc != 0 + +# Cool stuff + - name: "Passwordless sudo" lineinfile: path: /etc/sudoers state: present regexp: '^%sudo' line: '%sudo ALL=(ALL) NOPASSWD: ALL' - validate: 'visudo -cf %s' - + validate: 'visudo -cf %s'
\ No newline at end of file |