{% if __user['username'] == 'drone' %} # ansible.siempie.internal drone ansible.siempie.internal=(root) NOPASSWD:/usr/bin/git -C /etc/ansible * drone ansible.siempie.internal=(root) NOPASSWD:/usr/local/bin/ansible-galaxy install -r /etc/ansible/ansible_requirements.yaml drone ansible.siempie.internal=(root) NOPASSWD:/usr/local/bin/ansible-playbook * # mgmt01.siempie.local drone mgmt01.siempie.internal=(simon) NOPASSWD:/usr/local/bin/kubectl * {% else %} {% if sudo_pwless == False %} {{ __user['username'] }} ALL=(ALL) ALL {% endif %} {% if sudo_pwless == True %} {{ __user['username'] }} ALL=(ALL) NOPASSWD: ALL {% endif %} {% endif %}