Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ismoilovdevml committed Sep 11, 2024
1 parent 7eab0bb commit b2ad2e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions Ansible/jenkins/install_jenkins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@

tasks:

- name: Install wget on Debian/Ubuntu
when: ansible_os_family == "Debian"
apt:
update_cache: yes
name: wget
state: present

- name: Install wget on Red Hat/Fedora/Alma/Rocky
when: ansible_os_family == "RedHat"
yum:
name: wget
state: present

- name: Install Jenkins on Debian/Ubuntu
when: ansible_os_family == "Debian"
apt:
Expand Down
6 changes: 3 additions & 3 deletions Ansible/jenkins/uninstall_jenkins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
systemd:
name: jenkins
state: stopped
ignore_errors: yes # Agar xizmat topilmasa ham, davom ettiradi
ignore_errors: yes

- name: Uninstall Jenkins and Java on Debian/Ubuntu
when: ansible_os_family == "Debian"
Expand Down Expand Up @@ -65,7 +65,7 @@
systemd:
name: jenkins
state: stopped
ignore_errors: yes # Agar xizmat topilmasa ham, davom ettiradi
ignore_errors: yes

- name: Uninstall Jenkins and Java on Red Hat/Fedora/Alma/Rocky
when: ansible_os_family == "RedHat"
Expand All @@ -86,7 +86,7 @@
when: ansible_os_family == "RedHat"
ansible.builtin.command:
cmd: rpm -e gpg-pubkey-$(rpm -q --qf "%{version}-%{release}\n" gpg-pubkey | grep jenkins | awk '{print $1}')
ignore_errors: yes # Agar kalit topilmasa, davom ettiradi
ignore_errors: yes

- name: Remove Jenkins cache, log, and data directories on Red Hat/Fedora/Alma/Rocky
when: ansible_os_family == "RedHat"
Expand Down

0 comments on commit b2ad2e7

Please sign in to comment.