Sha256: 9649f84cffe2eeaf54f92e52413b549ab2a0aae3f2047ae6b4ecc1eac56da234

Contents?: true

Size: 761 Bytes

Versions: 36

Compression:

Stored size: 761 Bytes

Contents

DEPLOYER_NAME=<%= @attributes.deployer_name %>
DEPLOYER_PWD=<%= @attributes.deployer_password %>
DEPLOYER_PATH=/home/$DEPLOYER_NAME

if sunzi.to_be_done "create deployer"; then
  adduser $DEPLOYER_NAME --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password
  echo "$DEPLOYER_NAME:$DEPLOYER_PWD" | sudo chpasswd
  adduser $DEPLOYER_NAME sudo

  mkdir $DEPLOYER_PATH/.ssh
  chmod 700 $DEPLOYER_PATH/.ssh

  mv files/authorized_keys $DEPLOYER_PATH/.ssh/authorized_keys
  chmod 644 $DEPLOYER_PATH/.ssh/authorized_keys

  chown -R $DEPLOYER_NAME:$DEPLOYER_NAME $DEPLOYER_PATH

	mv files/sudoers /etc/sudoers.d/$DEPLOYER_NAME
	chown root:root /etc/sudoers.d/$DEPLOYER_NAME
	chmod 0440 /etc/sudoers.d/$DEPLOYER_NAME

  sunzi.done "create deployer"
fi

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
sunzi-rails-0.2.14 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.13 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.12 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.11 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.10 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.9 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.8 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.7 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.6 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.5 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.4 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.3 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.2 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.1 lib/templates/create/recipes/user.sh
sunzi-rails-0.2.0 lib/templates/create/recipes/user.sh
sunzi-rails-0.1.0 lib/templates/create/recipes/user.sh