= bug description =
I was recently sponsored into sysadmin-badges for pushing badges out. Whenever I try running rbac-playbook for the push-badges.yml playbook, I receive a stacktrace denying permissions on a file.
= bug analysis =
I am running the following command to get the error. {{{ $ rbac-playbook $(pwd)/playbooks/manual/push-badges.yml Traceback (most recent call last): File "/usr/bin/rbac-playbook", line 9, in <module> load_entry_point('ansible-utils==0.0.6', 'console_scripts', 'rbac-playbook')() File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point return ep.load() File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load entry = import(self.module_name, globals(),globals(), ['name']) File "/usr/lib/python2.7/site-packages/ansible_utils/rbac_playbook.py", line 94, in <module> config = get_config() File "/usr/lib/python2.7/site-packages/ansible_utils/rbac_playbook.py", line 69, in get_config new_settings = read_configfile() File "/usr/lib/python2.7/site-packages/ansible_utils/rbac_playbook.py", line 89, in read_configfile with open(acl_filename, 'r') as acl_file: IOError: [Errno 13] Permission denied: '/etc/ansible_utils/rbac.yaml' }}}
= fix recommendation =
Is it a permissions issue for my user account? I'm unsure what a fix looks like or even what the issue is with me running this playbook.
Try using sudo rbac-playbook
Replying to [comment:1 cydrobolt]:
Try using sudo rbac-playbook I tried using sudo but received a message about not having the privileges to execute with sudo. I don't have the exact message (don't have my Yubikey on me at this moment), but I can get the full message if needed.
Yes, the full message would be appreciated.
This isn't the same message I remember getting before, but this is what I get now:
{{{ $ sudo rbac-playbook $(pwd)/playbooks/manual/push-badges.yml user jflory7 is not authorized to run /home/fedora/jflory7/ansible/playbooks/manual/push-badges.yml }}}
{{{ $ sudo rbac-playbook push-badges.yml Traceback (most recent call last): File "/bin/rbac-playbook", line 9, in <module> load_entry_point('ansible-utils==0.0.6', 'console_scripts', 'rbac-playbook')() File "/usr/lib/python2.7/site-packages/ansible_utils/rbac_playbook.py", line 364, in main rbac_playbook(playbook_name, options) File "/usr/lib/python2.7/site-packages/ansible_utils/rbac_playbook.py", line 303, in rbac_playbook checksum = get_checksum(playbook_name) File "/usr/lib/python2.7/site-packages/ansible_utils/rbac_playbook.py", line 161, in get_checksum with open(full_filename, 'r') as fd: IOError: [Errno 2] No such file or directory: '/srv/web/infra/ansible/playbooks/push-badges.yml' }}}
{{{ $ sudo rbac-playbook $(pwd)/playbooks/manual/push-badges.yml user jflory7 is not authorized to run /srv/web/infra/ansible/playbooks/manual/push-badges.yml }}}
Right, it's not going to let you run a arbitrary playbook from your homedir. ;)
Try:
sudo rbac-playbook manual/push-badges.yml
or
sudo rbac-playbook /srv/web/infra/ansible/playbooks/manual/push-badges.yml
Ahh, the first version worked for me. I had to prefix the manual/ part to the command. When I tried the second command, I received the same error.
Login to comment on this ticket.