Skip to content

Commit

Permalink
Fix yamllint offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermeindl committed Jan 17, 2024
1 parent 3b2de63 commit 2dfd526
Show file tree
Hide file tree
Showing 9 changed files with 1,314 additions and 302 deletions.
2 changes: 2 additions & 0 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---

- name: Ensures software_dir exists
ansible.builtin.file:
path: '{{ software_dir }}'
Expand Down
2 changes: 2 additions & 0 deletions roles/mysql_client/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
---

mysql_apt_repo_key_file: /etc/apt/trusted.gpg.d/mysql.gpg
2 changes: 1 addition & 1 deletion roles/nodejs/tasks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
- name: Ensure Node.js and npm are installed.
ansible.builtin.apt:
name: nodejs
allow_downgrades: yes
allow_downgrades: true
state: present

- name: Set prefix for npm (root)
Expand Down
9 changes: 8 additions & 1 deletion roles/redis_server/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ redis_server_packages:
- redis-server
- iproute2

redis_server_bind: '127.0.0.1 ::1'
# redis 6.2 or newer is required for GitLab 16.8
redis_use_redis_io: true
redis_apt_url: https://packages.redis.io/deb
redis_apt_suites: '{{ ansible_distribution_release }}'
redis_apt_components: main
redis_apt_key_url: https://packages.redis.io/gpg

redis_server_bind: '127.0.0.1 -::1'

# socket is not working on all systems!
# port 0 for socket only
Expand Down
28 changes: 28 additions & 0 deletions roles/redis_server/tasks/setup.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
---

- name: Redis repo
when: redis_use_redis_io
block:
# see https://docs.ansible.com/ansible/latest/collections/ansible/builtin/deb822_repository_module.html
- name: Add nodesource apt repository
ansible.builtin.deb822_repository:
name: redis
uris: "{{ redis_apt_url }}"
types: deb
suites: "{{ redis_apt_suites }}"
components: "{{ redis_apt_components }}"
signed_by: "{{ redis_apt_key_url }}"
state: present
register: redis_repo

- name: Update apt cache
apt:
update_cache: true
when: redis_repo.changed
tags:
- skip_ansible_lint

- name: Do not redis repo
when: not redis_use_redis_io
ansible.builtin.deb822_repository:
name: redis
state: absent

- name: Be sure redis is installed
ansible.builtin.apt:
name: '{{ redis_server_packages }}'
Expand Down
Loading

0 comments on commit 2dfd526

Please sign in to comment.