How should I run task with "owner" not shell owner in AIRFLOW
<p>My task code is the following.</p>

<pre><code>from airflow.models import DAG
from airflow.operators import BashOperator
from datetime import datetime, timedelta
rootdir = "/tmp/airflow"
default_args = {
    'owner': 'max',
    'depends_on_past': False,
    'start_date': datetime.now(),
    'email': ['max@test.com'],
    'email_on_failure': False,
    'email_on_retry': False,
    'retries': 1,
    'retry_delay': timedelta(minutes=5),
}
dag = DAG('test3', default_args=default_args,
                    schedule_interval='*/2 * * * *')
t1 = BashOperator(
    task_id='test3-task1',
    bash_command='date  &gt;&gt; {rootdir}/test3-task1.out'.format(rootdir=rootdir),
    owner='max',
    dag=dag)
t2 = BashOperator(
    task_id='test3-task2',
    bash_command='whoami',
    retries=3,
    owner='max',
    dag=dag)
</code></pre>

<p>Then I run the command "airflow test test3 test3-task2  2016-07-25" with 'airflow' user of linux.   The result of output "whoami" is "airflow".
But I hope that the output result is "owner" of task.</p>

<p>What is my wrong ?  </p>

<p>Thanks</p>

<p>the following is the output result.</p>

<p>[2016-07-25 11:22:37,716] {bash_operator.py:64} INFO - Temporary script location :/tmp/airflowtmpoYNJE8//tmp/airflowtmpoYNJE8/test3-task2U1lpom</p>

<p>[2016-07-25 11:22:37,716] {bash_operator.py:65} INFO - Running command: whoami</p>

<p>[2016-07-25 11:22:37,722] {bash_operator.py:73} INFO - Output:</p>

<p>[2016-07-25 11:22:37,725] {bash_operator.py:77} INFO - <strong>airflow</strong></p>

<p>[2016-07-25 11:22:37,725] {bash_operator.py:80} INFO - Command exited with return code 0</p>