Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions molecule/gitlab_runner/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ provisioner:
host_vars:
instancegitlabciopenstack1:
gitlab_runner_version: "18.0.2"
gitlab_runner_deb_file: "https://packages.gitlab.com/runner/gitlab-runner/packages/{{ ansible_distribution | lower }}/{{ ansible_distribution_release | lower }}/gitlab-runner_{{ gitlab_runner_pkg_version }}_amd64.deb/download.deb"
gitlab_runner_helper_images_deb_file: "https://packages.gitlab.com/runner/gitlab-runner/packages/{{ ansible_distribution | lower }}/{{ ansible_distribution_release | lower }}/gitlab-runner-helper-images_{{ gitlab_runner_pkg_version }}_all.deb/download.deb"
gitlab_runner_deb_file: "https://packages.gitlab.com/runner/gitlab-runner/packages/{{ ansible_facts.distribution | lower }}/{{ ansible_facts.distribution_release | lower }}/gitlab-runner_{{ gitlab_runner_pkg_version }}_amd64.deb/download.deb"
gitlab_runner_helper_images_deb_file: "https://packages.gitlab.com/runner/gitlab-runner/packages/{{ ansible_facts.distribution | lower }}/{{ ansible_facts.distribution_release | lower }}/gitlab-runner-helper-images_{{ gitlab_runner_pkg_version }}_all.deb/download.deb"
gitlab_runner_install_docker: true
gitlab_runner_ssh_public_key: "test_key.pub"
gitlab_runner_ssh_private_key: "test_key"
Expand Down
4 changes: 2 additions & 2 deletions molecule/gitlab_runner/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
hosts: "all"
tasks:
- name: "Install necessary packages"
when: "ansible_os_family == 'Debian'"
when: "ansible_facts.os_family == 'Debian'"
block:
- name: "Install missing dependencies"
ansible.builtin.apt:
Expand All @@ -21,7 +21,7 @@
state: "present"
update_cache: true
- name: "Set up iptables"
when: "ansible_distribution == 'Debian'"
when: "ansible_facts.distribution == 'Debian'"
block:
- name: "Install missing dependencies"
ansible.builtin.apt:
Expand Down
6 changes: 3 additions & 3 deletions molecule/netplan/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
block:
- name: "Store actual and target network settings."
ansible.builtin.set_fact:
actual_interface_name: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['interface'] }}"
actual_interface_name: "{{ ansible_facts.default_ipv4.interface }}"
target_interface_name: "{{ netplan_ethernets[0]['interface_name'] }}"
actual_ip_addresses: "{{ hostvars[inventory_hostname]['ansible_all_ipv4_addresses'] | ansible.utils.ipaddr('address') }}"
actual_ip_addresses: "{{ ansible_facts.all_ipv4_addresses | ansible.utils.ipaddr('address') }}"
target_ip_address: "{{ netplan_ethernets[0]['addresses'][0] | ansible.utils.ipaddr('address') }}"
actual_subnet: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['netmask'] }}"
actual_subnet: "{{ ansible_facts.default_ipv4.netmask }}"
target_subnet: "{{ netplan_ethernets[0]['addresses'][0] | ansible.utils.ipaddr('netmask') }}"

- name: "Check that network settings are correct."
Expand Down
4 changes: 2 additions & 2 deletions roles/gitlab_runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Docker is required for the `docker` executor but not for the
### Docker-machine variables

```yaml
gitlab_runner_docker_machine_binary_url: "https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/releases/v0.16.2-gitlab.25/downloads/docker-machine-Linux-{{ ansible_architecture }}"
gitlab_runner_docker_machine_binary_url: "https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/releases/v0.16.2-gitlab.25/downloads/docker-machine-Linux-{{ ansible_facts.architecture }}"
```

The URL where to download the docker-machine binary file from.
Expand All @@ -102,7 +102,7 @@ The checksum of the downloaded docker-machine binary. This must correspond to th
### Flatcar Linux configuration

```yaml
gitlab_runner_transpiler_binary_url: "https://github.com/coreos/butane/releases/download/v0.23.0/butane-{{ ansible_architecture }}-unknown-linux-gnu"
gitlab_runner_transpiler_binary_url: "https://github.com/coreos/butane/releases/download/v0.23.0/butane-{{ ansible_facts.architecture }}-unknown-linux-gnu"
```

The URL to the configuration transpiler binary that shall be used.
Expand Down
4 changes: 2 additions & 2 deletions roles/gitlab_runner/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ gitlab_runner_pkg_version: "{{ gitlab_runner_version + '-1' if gitlab_runner_ver

gitlab_runner_deb_file: ""

gitlab_runner_docker_machine_binary_url: "https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/releases/v0.16.2-gitlab.25/downloads/docker-machine-Linux-{{ ansible_architecture }}"
gitlab_runner_docker_machine_binary_url: "https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/releases/v0.16.2-gitlab.25/downloads/docker-machine-Linux-{{ ansible_facts.architecture }}"

gitlab_runner_docker_machine_binary_checksum: "sha256:04cc18c8f6ee0d71614064fa81116f20f3a37af53eeebf19bfb832ab9c46d3a0"

gitlab_runner_transpiler_binary_url: "https://github.com/coreos/butane/releases/download/v0.23.0/butane-{{ ansible_architecture }}-unknown-linux-gnu"
gitlab_runner_transpiler_binary_url: "https://github.com/coreos/butane/releases/download/v0.23.0/butane-{{ ansible_facts.architecture }}-unknown-linux-gnu"

gitlab_runner_transpiler_binary_checksum: "sha256:5833ce9f9c2932d9b02bc05821ffb6927d1e896a524c8dd53a4c9d2d90c47e2c"

Expand Down
6 changes: 3 additions & 3 deletions roles/gitlab_runner/tasks/install.debianlike.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
ansible.builtin.deb822_repository:
name: "gitlab-runner"
types: "deb"
uris: "https://packages.gitlab.com/runner/gitlab-runner/{{ ansible_distribution | lower }}/"
suites: "{{ ansible_distribution_release }}"
uris: "https://packages.gitlab.com/runner/gitlab-runner/{{ ansible_facts.distribution | lower }}/"
suites: "{{ ansible_facts.distribution_release }}"
components: "main"
signed_by: "https://packages.gitlab.com/runner/gitlab-runner/gpgkey"
state: "present"
Expand All @@ -37,7 +37,7 @@
owner: "root"
group: "root"
mode: '0644'
when: "ansible_distribution == 'Debian'"
when: "ansible_facts.distribution == 'Debian'"

- name: "Install gitlab-runner-helper-images with downgrade option"
ansible.builtin.apt:
Expand Down
4 changes: 2 additions & 2 deletions roles/gitlab_runner/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

---
- name: "Set OS family dependent variables"
ansible.builtin.include_vars: "{{ ansible_os_family | lower }}.yml"
ansible.builtin.include_vars: "{{ ansible_facts.os_family | lower }}.yml"

- name: "Set variable if autoscaling runner must be configured"
ansible.builtin.set_fact:
Expand All @@ -27,7 +27,7 @@

- name: "Include installation tasks for Debian-like OS"
ansible.builtin.include_tasks: "install.debianlike.yml"
when: "ansible_os_family == 'Debian'"
when: "ansible_facts.os_family == 'Debian'"

- name: "Include autoscaler install tasks"
ansible.builtin.include_tasks: "install.autoscaler-plugin.yml"
Expand Down
4 changes: 2 additions & 2 deletions roles/keepalived/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,15 @@ keepalived_weight: '0'
Set the unicast source IP address of the Keepalived instance:

```yaml
keepalived_unicast_src_ip: '{{ ansible_default_ipv4.address }}'
keepalived_unicast_src_ip: '{{ ansible_facts.default_ipv4.address }}'
```

#### Keepalived instance network interface

Set network interface to which the floating IP address is associated:

```yaml
keepalived_interface: "{{ ansible_default_ipv4.interface }}"
keepalived_interface: "{{ ansible_facts.default_ipv4.interface }}"
```

#### Keepalived instance virtual IP address and network interface
Expand Down
4 changes: 2 additions & 2 deletions roles/keepalived/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ keepalived_priority: "{{ '100' if keepalived_state == 'MASTER' else '99' }}"
# Keepalived instance state MASTER or BACKUP
keepalived_state: "MASTER"
# Keepalived instance network interface
keepalived_interface: "{{ ansible_default_ipv4.interface }}"
keepalived_interface: "{{ ansible_facts.default_ipv4.interface }}"
# Keepalived instance virtual IP address and network interface
keepalived_virtual_ipaddress_config: "{{ keepalived_virtual_ip_address }} dev {{ keepalived_interface }}"
# Keepalived instance unicast source IP address
keepalived_unicast_src_ip: "{{ ansible_default_ipv4.address }}"
keepalived_unicast_src_ip: "{{ ansible_facts.default_ipv4.address }}"

# Enable process tracking
keepalived_enable_process_tracking: true
Expand Down
2 changes: 1 addition & 1 deletion roles/zammad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Choose another release channel for the Zammad packages.
Please refer to <https://packager.io/gh/zammad/zammad> for a complete list.

```yaml
zammad_domain_name: "{{ ansible_fqdn }}"
zammad_domain_name: "{{ ansible_facts.fqdn }}"
```

Zammad's fully qualified domain name.
Expand Down
2 changes: 1 addition & 1 deletion roles/zammad/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
zammad_version: "6.5.0"
zammad_release_channel: "stable"
zammad_repo_url: "https://dl.packager.io/srv/deb/zammad/zammad/{{ zammad_release_channel }}/{{ ansible_facts.distribution | lower }}"
zammad_domain_name: "{{ ansible_fqdn }}"
zammad_domain_name: "{{ ansible_facts.fqdn }}"

zammad_nginx_config_path: "/etc/nginx/sites-available/zammad.conf"
zammad_ssl_cert_path: "/etc/ssl/certs/zammad_cert.pem"
Expand Down
6 changes: 3 additions & 3 deletions roles/zammad/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
---

- name: "Configure Zammad repository for Centos-like"
when: "ansible_distribution | lower == 'centos'"
when: "ansible_facts.distribution | lower == 'centos'"
block:

- name: "Install | Install EPEL repo"
Expand All @@ -27,7 +27,7 @@
mode: "0644"

- name: "Configure Zammad repository for Ubuntu"
when: "ansible_distribution | lower == 'ubuntu'"
when: "ansible_facts.distribution | lower == 'ubuntu'"
block:

- name: "Remove Zammad apt key from legacy trusted.gpg keyring"
Expand All @@ -37,7 +37,7 @@

- name: "Remove Zammad DEB repository from sources.list"
ansible.builtin.apt_repository:
repo: "deb https://dl.packager.io/srv/deb/zammad/zammad/{{ zammad_release_channel }}/ubuntu {{ ansible_distribution_version }} main"
repo: "deb https://dl.packager.io/srv/deb/zammad/zammad/{{ zammad_release_channel }}/ubuntu {{ ansible_facts.distribution_version }} main"
state: "absent"
filename: "zammad"
update_cache: false
Expand Down