Ask Your Question
0

hash not creating file in sudoers.d file . Under dat_eng, I should see something like _10_somerole-data_eng but it's not getting created

asked 2018-05-15 15:58:03 -0500

olanna gravatar image

updated 2018-05-16 07:36:48 -0500

DarylW gravatar image

.

 # -- Module: sudo ------------------------------------------------------- {{{
#
sudo::configs:
  cloud-init:
    content: |
      Defaults:someuser !requiretty
      server ALL = NOPASSWD: ALL
      someuser ALL = NOPASSWD: ALL
  "%{hiera('my_role')}-someuser":
    content: "%{hiera('my_role:owner')} ALL = (someuser) NOPASSWD: ALL"
  **"%{hiera('my_role')}-data_eng": |
# -- Module: sudo ------------------------------------------------------- {{{
    content: "%{hiera('my_role:owner')} ALL = (root) NOPASSWD: /sbin/initctl status hadoop-yarn-resourcemanager,
      /sbin/initctl stop hadoop-yarn-resourcemanager, /sbin/initctl start hadoop-yarn-resourcemanager"**
#
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-15 16:44:25 -0500

olanna gravatar image

I found the issue. I created one line for the resourcemanager and used a * for the command. Worked like a charm.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-05-15 15:58:03 -0500

Seen: 20 times

Last updated: May 16