Skip to content

Commit

Permalink
Merge pull request #998 from mira-miracoli/jenkins-update
Browse files Browse the repository at this point in the history
Changes to hxr.admin-tools
  • Loading branch information
mira-miracoli authored Nov 20, 2023
2 parents 184f16c + c0ed81f commit 2bfa95b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ admin_packages:
- net-tools
- unzip
- mutt
- byobu
- "{{ 'byobu' if ansible_distribution_major_version < '9' else omit }}"
- tmpwatch
- rclone
# centos specific
- setools-console
- yum-utils
- bind-utils

16 changes: 2 additions & 14 deletions roles/hxr.admin-tools/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
---
- name: Install useful tools
yum:
name: "{{ admin_packages }}"
name: "{{ admin_packages }}"
state: installed

- name: Check if firewalld is already installed
yum:
list: firewalld
# If not installed yum_list.results[*].yumstate != installed
register: yum_list

- name: Stop firewalld
service:
name: firewalld
state: stopped
enabled: no
when: yum_list.results | selectattr("yumstate", "match", "installed") | list | length != 0

- name: Start atop
service:
name: atop
state: started
enabled: yes
when: "'atop' in admin_packages"

0 comments on commit 2bfa95b

Please sign in to comment.