Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jail admin sudo validation should use the jail visudo #1

Open
clementmartin opened this issue Apr 24, 2015 · 0 comments
Open

Jail admin sudo validation should use the jail visudo #1

clementmartin opened this issue Apr 24, 2015 · 0 comments
Labels

Comments

@clementmartin
Copy link
Owner

the following task uses the host sudo to validate the jail sudoers file:

- name: add jail admin to sudoers
  lineinfile:
    dest:  "{{ jails_dir }}/{{ jail_master_tpl_name }}/usr/local/etc/sudoers"
    line: "{{ jails_admin_user }} ALL=(ALL) NOPASSWD: ALL"
    validate: 'jexec {{ jail_master_tpl_name }} visudo -cf %s'

It should use the jail sudo.

Simply wrapping the validation command does'nt work because ansible pass the full path from the host root filesystem, which obviously does'nt exist on the jail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant