Skip to content

Commit

Permalink
Adjust lower
Browse files Browse the repository at this point in the history
  • Loading branch information
dale-c-anderson committed May 30, 2024
1 parent 089d9c8 commit c5662a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@
state: present

- block:
- name: Ensure "mysql" service is running and starts on boot (Ubuntu < 22.04)
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version("22.04", "<")
- name: Ensure "mysql" service is running and starts on boot (Ubuntu < 20.04)
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version("20.04", "<")
ansible.builtin.service:
name: mysql
state: started
enabled: true

# Service name changes in newer Ubuntu versions
- name: Ensure "mariadb" service is running and starts on boot (Ubuntu >= 22.04)
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version("22.04", ">=")
- name: Ensure "mariadb" service is running and starts on boot (Ubuntu >= 20.04)
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version("20.04", ">=")
ansible.builtin.service:
name: mariadb
state: started
Expand Down

0 comments on commit c5662a3

Please sign in to comment.