From e011160e4929f9508dd05a09c75787d64ee06e26 Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 15 Jul 2019 23:03:07 +0200 Subject: [PATCH 1/7] ignore lint latest errors --- .ansible-lint | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .ansible-lint diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..cb8e2ac --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,2 @@ +skip_list: + - '405' From c40f2194b8442cfc7e3b562df940dadf88479300 Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 15 Jul 2019 23:07:17 +0200 Subject: [PATCH 2/7] We use vim --- defaults/main.yml | 14 +++++++++++++- tasks/editor.yml | 7 +++++++ tasks/main.yml | 5 ++++- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 tasks/editor.yml diff --git a/defaults/main.yml b/defaults/main.yml index ba856b3..7b5dd6e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,6 +1,18 @@ --- +# if you are interested in adding extra packages... do it here! packages_extra: [] # - foo # - bar -upgrade_packages_to_latest_version: false + +# do we want the latest package version or just upgrade manually? +upgrade_packages_to_latest_version: true + +# add eth zurich apt source +add_ethz: true + +# we use vim! +editor_is_vim: true + + +# version management submodules_versioncheck: true diff --git a/tasks/editor.yml b/tasks/editor.yml new file mode 100644 index 0000000..8cafd2b --- /dev/null +++ b/tasks/editor.yml @@ -0,0 +1,7 @@ +--- +- name: vim is our editor + become: true + alternatives: + name: editor + path: /usr/bin/vim.basic + when: editor_is_vim | bool diff --git a/tasks/main.yml b/tasks/main.yml index de226cb..fdc1134 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,6 +1,9 @@ --- - include_tasks: versioncheck.yml - when: submodules_versioncheck|bool + when: submodules_versioncheck | bool + +- include_tasks: editor.yml + when: editor_is_vim | bool - name: Install common base packages [Debian] become: yes From 74721683b7d92ada372a0af6cc4f237fe39dc805 Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 15 Jul 2019 23:09:33 +0200 Subject: [PATCH 3/7] fix linting warnings --- .ansible-lint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ansible-lint b/.ansible-lint index cb8e2ac..c1648fc 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,2 +1,2 @@ skip_list: - - '405' + - '403' From a4bc86ec094541c33d9ab4824c63632adbdd2cff Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 15 Jul 2019 23:09:48 +0200 Subject: [PATCH 4/7] Add eth zurich --- tasks/main.yml | 3 +++ tasks/sources.yml | 11 +++++++++++ vars/main.yml | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tasks/sources.yml diff --git a/tasks/main.yml b/tasks/main.yml index fdc1134..061e0a7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -5,6 +5,9 @@ - include_tasks: editor.yml when: editor_is_vim | bool +- include_tasks: sources.yml + when: add_ethz | bool + - name: Install common base packages [Debian] become: yes apt: diff --git a/tasks/sources.yml b/tasks/sources.yml new file mode 100644 index 0000000..cf913ce --- /dev/null +++ b/tasks/sources.yml @@ -0,0 +1,11 @@ +--- +- name: add etz apt + become: true + apt_repository: + repo: deb https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main + state: present + when: + - add_ethz | bool + - ansible_distribution == 'Debian' + - ansible_distribution_release == "wheezy" or ansible_distribution_release == "buster" + diff --git a/vars/main.yml b/vars/main.yml index b09c881..3233eda 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -43,5 +43,5 @@ fedora_packages: - python3-pip - python3 -playbook_version_number: 8952 # should be over ninethousand +playbook_version_number: 8953 # should be over ninethousand playbook_version_path: '/etc/ansible-version/base-packages_ffbsee_or_chaos-bodensee_github.version' From 90fadaade1ca5af83f6605b8cbc2e642bb30d17b Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 15 Jul 2019 23:12:21 +0200 Subject: [PATCH 5/7] Update packages --- vars/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vars/main.yml b/vars/main.yml index 3233eda..489b48a 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -2,6 +2,7 @@ base_packages: - tmux - sudo + - fail2ban - sysstat - ethtool - vim @@ -21,6 +22,9 @@ debian_packages: - python-apt - python3-apt - fio + - debian-goodies + - apt-dater-host + - apt-transport-https packages_for_all_except_rhel: - ranger @@ -43,5 +47,5 @@ fedora_packages: - python3-pip - python3 -playbook_version_number: 8953 # should be over ninethousand +playbook_version_number: 8954 # should be over ninethousand playbook_version_path: '/etc/ansible-version/base-packages_ffbsee_or_chaos-bodensee_github.version' From fdc0436a56c97fcfd7becba25d50dd2aa193ea11 Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 15 Jul 2019 23:47:30 +0200 Subject: [PATCH 6/7] Improve package management --- tasks/main.yml | 14 +------------- tasks/sources.yml | 23 ++++++++++++++++++++++- vars/main.yml | 2 +- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 061e0a7..c6fd4b7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -6,7 +6,7 @@ when: editor_is_vim | bool - include_tasks: sources.yml - when: add_ethz | bool + when: ansible_distribution == 'Debian' - name: Install common base packages [Debian] become: yes @@ -32,18 +32,6 @@ when: ansible_distribution == 'Fedora' -- name: Install some common Debian specific packages - become: yes - apt: - package: - - debian-goodies - - apt-dater-host - - apt-transport-https - state: present - update_cache: yes - cache_valid_time: 43200 - when: ansible_distribution == 'Debian' - - name: install packages for everyone except centos/rhel become: true package: diff --git a/tasks/sources.yml b/tasks/sources.yml index cf913ce..f5a0063 100644 --- a/tasks/sources.yml +++ b/tasks/sources.yml @@ -1,5 +1,18 @@ --- -- name: add etz apt +- name: Install some common Debian specific packages + become: yes + apt: + package: + - debian-goodies + - apt-dater-host + - apt-transport-https + state: present + update_cache: yes + cache_valid_time: 43200 + when: ansible_distribution == 'Debian' + + +- name: add eth zurich apt become: true apt_repository: repo: deb https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main @@ -9,3 +22,11 @@ - ansible_distribution == 'Debian' - ansible_distribution_release == "wheezy" or ansible_distribution_release == "buster" +- name: iremove eth zurich apt + become: true + apt_repository: + repo: deb-src https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main + state: absent + when: + - not add_ethz | bool + - ansible_distribution == 'Debian' diff --git a/vars/main.yml b/vars/main.yml index 489b48a..2a65ea2 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -47,5 +47,5 @@ fedora_packages: - python3-pip - python3 -playbook_version_number: 8954 # should be over ninethousand +playbook_version_number: 8955 # should be over ninethousand playbook_version_path: '/etc/ansible-version/base-packages_ffbsee_or_chaos-bodensee_github.version' From 118986f5d6b9c041e73fcbcf05fbdcdeffb5c92c Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 16 Jul 2019 00:07:03 +0200 Subject: [PATCH 7/7] i moved the repo --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 9f83de8..9d80cc4 100644 --- a/README.md +++ b/README.md @@ -29,5 +29,4 @@ Packages are defined as variable in the ``vars`` Folder. ------------ - Some CI-Testing would be nice. Eg with docker and some common linux distributions. - Meta File for Ansible Galaxy is missing -- Role should be moved to [chaos-bodensee](https://github.com/chaos-bodensee/) - Lint checks?