LoginSignup
4
5

More than 5 years have passed since last update.

【Rundeck】プロジェクトへのnode追加メモ

Posted at

/var/rundeck/projects/{Project}/etc/resources.xml に追加したいノードの情報を追加

例)

<node name="gate1" description="Sync contents server node" tags="" hostname="サーバA" username="rundeck"/>

※usernameは rootを使用しない=> rundeckにしておく

公開鍵の配置

  サーバBの公開鍵をサーバAへアップロード

  /var/lib/rundeck/.ssh/authorized_keys

追加先のノード(サーバA)で作業

useridを確認する

cat /etc/passwd

rundeckユーザー追加

未使用のidをuseridへ指定してrundeckユーザを追加する。

useradd -u {userid} rundeck

仮パスワード追加(後で削除する※パスワード認証できないようにするため)

passwd rundeck

wheelグループが sudo コマンドをパスワードなしで使用できるように変更「visudo」

Defaults requiretty =>sshでsudoできない
Defaults:%wheel !requiretty =>wheelグループのみsshでsudoできるように
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL

wheelグループに追加する

gpasswd -a rundeck wheel

.sshディレクトリ作成

mkdir /home/rundeck/.ssh

所有者変更

chown rundeck:rundeck /home/rundeck/.ssh

権限変更

chmod 700 /home/rundeck/.ssh

ファイル移動

mv /tmp/authorized_keys /home/rundeck/.ssh/

所有者変更

chown rundeck:rundeck /home/rundeck/.ssh/authorized_keys
4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5