Installing MariaDB behind proxy with Ansible

Hi,

with Ansible my plan was and still is, to automate the deployment for around 15 servers with latest Oracle Linux (don’t ask, it’s a requirement) and mariadb.

So far so good and nothing special. One big problem is, that the servers are running in an environment behind a proxy. The proxy should only be active for dnf commands. This is something a got working with every server.
Installing a dedicated mariadb version (11.4) was at first possible too. (See Download MariaDB Server - MariaDB.org)

Long story short: After the first server was installed successfully, all others got an error message, that the repo file could not be downloaded. When installing mariadb with “normal” dnf command on the server itself, no error occures.

Soes somebody have any idea, how I might debug this error? The exact message and the playbook I’ll privide tomorrow from work.

Thanks a lot.

Hi @Marcusc

How did you configure proxy at the system level? DNF should honor proxy set via http(s)_proxy environment variables so you can try this:

- name: Install MariaDB
  ansible.builtin.dnf:
  ...
  environment:
    http_proxy: http://proxy.example.com:8080
    https_proxy: http://proxy.example.com:8080