Page MenuHomeDevCentral

Allow nasqueron-irc to control Odderon service
ClosedPublic

Authored by dereckson on Jan 30 2017, 00:59.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 04:56
Unknown Object (File)
Tue, Nov 12, 02:57
Unknown Object (File)
Tue, Nov 12, 02:25
Unknown Object (File)
Mon, Nov 11, 22:26
Unknown Object (File)
Mon, Nov 11, 12:25
Unknown Object (File)
Sat, Nov 9, 15:29
Unknown Object (File)
Sun, Oct 27, 11:39
Unknown Object (File)
Mon, Oct 21, 02:16
Subscribers

Details

Summary

f7788aa69fe6 deployed a systemd unit to control the darkbot.

Before, 618a748f0998 offered to nasqueron-irc group the right
to run any command as odderon user.

This is coherent to allow the same group to stop or restart the bot
through systemd.

Test Plan

As a member of the nasqueron-irc group:
sudo systemctl restart odderon

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
No Lint Coverage
Unit
No Test Coverage
Branch
restart-odderon (branched from master)
Build Status
Buildable 1371
Build 1619: arc lint + arc unit

Event Timeline

dereckson added inline comments.
roles/shellserver/odderon/files/odderon.sudoers
4

service.sls should know it's Jinja template

dereckson marked an inline comment as done.
dereckson edited edge metadata.

odderon.sudoers is now a jinja template

Salt master
$ cd /opt/nasqueron-operations
$ arc patch D888
$ salt eglide state.apply roles/shellserver/odderon/account
eglide:
[…]
          ID: odderon_sudo_capabilities_file
    Function: file.managed
        Name: /etc/sudoers.d/odderon
      Result: True
     Comment: File /etc/sudoers.d/odderon updated
     Started: 01:33:07.655830
    Duration: 1149.627 ms
     Changes:   
              ----------
              diff:
                  --- 
                  +++ 
                  @@ -1 +1,12 @@
                   %nasqueron-irc ALL=(odderon) NOPASSWD: ALL
                  +
                  +# Service management
                  +
                  +%nasqueron-irc ALL= NOPASSWD: /bin/systemctl start odderon
                  +
                  +%nasqueron-irc ALL= NOPASSWD: /bin/systemctl stop odderon
                  +
                  +%nasqueron-irc ALL= NOPASSWD: /bin/systemctl restart odderon
                  +
                  +%nasqueron-irc ALL= NOPASSWD: /bin/systemctl reload odderon
                  +
Eglide
$ sudo systemctl restart odderon

01:34:51 -!- Odderon has quit [Remote host closed the connection]
01:35:08 -!- Odderon has joined #nasqueron-ops

This revision is now accepted and ready to land.Jan 30 2017, 01:39
This revision was automatically updated to reflect the committed changes.