From 51d03f8e58c5e303f80160f1f7e4909f2481e3a7 Mon Sep 17 00:00:00 2001 From: Brian Schonecker Date: Fri, 19 Apr 2024 14:55:31 -0400 Subject: [PATCH] Install tasks should become: true so that the role can be run as a non-root user. --- tasks/install_deps.yml | 9 +++++++++ tasks/install_runner.yml | 1 + 2 files changed, 10 insertions(+) diff --git a/tasks/install_deps.yml b/tasks/install_deps.yml index f62d6f9..8c559e2 100644 --- a/tasks/install_deps.yml +++ b/tasks/install_deps.yml @@ -11,6 +11,7 @@ - libicu57 state: present update_cache: true + become: true when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "9") - name: Install dependencies on Debian Buster @@ -24,6 +25,7 @@ - libicu63 state: present update_cache: true + become: true when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "10") - name: Install dependencies on Debian Bullseye @@ -37,6 +39,7 @@ - libicu67 state: present update_cache: true + become: true when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "11") - name: Install dependencies on Debian Bookworm @@ -50,6 +53,7 @@ - libicu72 state: present update_cache: true + become: true when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "12") - name: Install dependencies on Ubuntu Xenial systems @@ -63,6 +67,7 @@ - libicu55 state: present update_cache: true + become: true when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "16") - name: Install dependencies on Ubuntu Bionic systems @@ -76,6 +81,7 @@ - libicu60 state: present update_cache: true + become: true when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "18") - name: Install dependencies on Ubuntu Focal systems @@ -89,6 +95,7 @@ - libicu66 state: present update_cache: true + become: true when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "20") - name: Install dependencies on Ubuntu Jammy systems @@ -101,6 +108,7 @@ - libicu70 state: present update_cache: true + become: true when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "22") - name: Install dependencies on RHEL/CentOS/Fedora systems @@ -113,6 +121,7 @@ - libicu state: present update_cache: true + become: true when: (ansible_facts.distribution == "RedHat") or (ansible_facts.distribution == "CentOS") or (ansible_facts.distribution == "Fedora") or diff --git a/tasks/install_runner.yml b/tasks/install_runner.yml index 173476f..5516d7b 100644 --- a/tasks/install_runner.yml +++ b/tasks/install_runner.yml @@ -123,6 +123,7 @@ ansible.builtin.command: "./svc.sh start" args: chdir: "{{ runner_dir }}" + become: true no_log: "{{ hide_sensitive_logs | bool }}" ignore_errors: "{{ ansible_check_mode }}" changed_when: true