From 71250e63079886396de414981b3cd11075d83007 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 14 Jun 2017 23:24:17 +0800 Subject: Add basic common role --- roles/common/tasks/main.yml | 16 ++++++++++++++++ roles/common/vars/main.yml | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 roles/common/tasks/main.yml create mode 100644 roles/common/vars/main.yml diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml new file mode 100644 index 0000000..ddcb6be --- /dev/null +++ b/roles/common/tasks/main.yml @@ -0,0 +1,16 @@ +--- +- name: Ensure the APT cache is up-to-date + apt: + update_cache: yes + cache_valid_time: 3600 + +- name: Perform a full system upgrade + apt: + upgrade: "safe" + +- name: Install basic common packages + apt: + name: "{{ item }}" + with_items: "{{ common_packages }}" + +# vim: set ft=yaml sw=2: diff --git a/roles/common/vars/main.yml b/roles/common/vars/main.yml new file mode 100644 index 0000000..7a7c360 --- /dev/null +++ b/roles/common/vars/main.yml @@ -0,0 +1,10 @@ +--- + +# Common/basic packages for both master and nodes +common_packages: + - aptitude + - chrony + - vim + - zsh + +# vim: set ft=yaml sw=2: -- cgit v1.2.2