LoginSignup
0
1

More than 3 years have passed since last update.

azure cloud-init を使ってみた

Last updated at Posted at 2020-11-17

やったこと

仮想マシンの作成 の カスタム データ に下記を入力

#cloud-config
timezone: Asia/Tokyo
locale: ja_JP.utf8
package_upgrade: true
packages:
  - tmux
  - tree
power_state:
  delay: "+10"
  mode: reboot
  message: Bye Bye
  timeout: 30
runcmd:
  - setenforce 0
  - sed -i -e 's/^\SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
  - systemctl stop firewalld
  - systemctl disable firewalld
  - systemctl restart rsyslog

結果

  • 初回起動時から tmux がインストールされた状態である
  • firewalld が stop 状態である
  • /etc/selinux/config の SELINUX が disabled になっている
  • reboot は目視してないけど、/var/log/messages で shutdown と書いてあったので実行されているんだと思う

参考記事

0
1
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
0
1