idealista/airflow-role

Install tasks fail when run without escalated privileges

Closed this issue · 0 comments

Prerequisites

Description

Some tasks like Airflow | Ensure Airflow group fail when run without escalated privileges.

Steps to Reproduce

  1. Install the module
  2. Run a playbook with the module included

Expected behavior: [What you expect to happen]

TASK [airflow : Airflow | Ensure Airflow group] ********************************************************************************************************************************************************************************
ok: [server-name]

Actual behavior: [What actually happens]

TASK [airflow : Airflow | Ensure Airflow group] ********************************************************************************************************************************************************************************
fatal: [1riv-dev-air]: FAILED! => {"changed": false, "msg": "groupadd: Permission denied.\ngroupadd: cannot lock /etc/group; try again later.\n", "name": "airflow"}

Reproduces how often: [What percentage of the time does it reproduce?]

Every time

Versions

The version/s you notice the behavior.

idealist.airflow-role 1.7.2
ubuntu bionic 18.04

Additional Information

I resolved this issue by adding become: true to the imported task, but this should be documented or added to the tasks.

- hosts: airflow
  tasks:
    - import_role:
        name: airflow
      become: true