'Preprocess the playbook data for become attributes
This is called from the Base object\'s preprocess_data() method which
in turn is called pretty much anytime any sort of playbook object
(plays, tasks, blocks, etc) is created.'

def _preprocess_data_become(self, ds):

    self._detect_privilege_escalation_conflict(ds)
    if (('sudo' in ds) or ('sudo_user' in ds)):
        ds['become_method'] = 'sudo'
        if ('sudo' in ds):
            ds['become'] = ds['sudo']
            del ds['sudo']
        if ('sudo_user' in ds):
            ds['become_user'] = ds['sudo_user']
            del ds['sudo_user']
        display.deprecated("Instead    of    sudo/sudo_user,    use    become/become_user    and    make    sure    become_method    is    'sudo'    (default)", '2.6')
    elif (('su' in ds) or ('su_user' in ds)):
        ds['become_method'] = 'su'
        if ('su' in ds):
            ds['become'] = ds['su']
            del ds['su']
        if ('su_user' in ds):
            ds['become_user'] = ds['su_user']
            del ds['su_user']
        display.deprecated("Instead    of    su/su_user,    use    become/become_user    and    set    become_method    to    'su'    (default    is    sudo)", '2.6')
    return ds
