{% if __user['username'] == 'drone' %} # ansible.siempie.internal {% if inventory_hostname == '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 * {% endif %} # mgmt01.siempie.local {% if inventory_hostname == 'mgmt01.infra.vpn.mirahsimon.us' %} drone mgmt01.siempie.internal=(simon) NOPASSWD:/usr/local/bin/kubectl * {% endif %} # registry.siempie.internal {% if inventory_hostname == 'mgmt01.infra.vpn.mirahsimon.us' %} drone registry.siempie.internal=(root) NOPASSWD:/ {% endif %} {% else %} {% if sudo_pwless == False %} {{ __user['username'] }} ALL=(ALL) ALL {% endif %} {% if sudo_pwless == True %} {{ __user['username'] }} ALL=(ALL) NOPASSWD: ALL {% endif %} {% endif %}