Sha256: 1650bdeee4aa3fe4f7af98f4a1468fe245bf60f46e901b1cd26f3519b0b6df70

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

module Caco::Debian
  class AddUser < Trailblazer::Operation
    step Subprocess(Caco::Debian::UserHome),
      input: ->(_ctx, user:, **) {{
        user: user
      }},
      Output(:success) => End(:success),
      Output(:failure) => Track(:success)

    step Subprocess(Caco::Executer),
      input: ->(_ctx, user:, **) {{
        command: "adduser --disabled-password --gecos '' --quiet --force-badname #{user}"
      }}

    step ->(ctx, **) { ctx[:created] = true },
      id: :mark_created
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caco-0.1.0 lib/caco/debian/add_user.rb