0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

yaml個人メモ

Last updated at Posted at 2020-12-25
playbook.yml
--- #YAML開始
 - hosts: server_01
   tasks:
     - name: Ping Connection
       ping:

... #YAML終了
 - shell: cd aaa; cd bbb; cd ccc

# リテラルスタイル |:改行を文字列として変換 -:最終行の改行コードを削除
 -shell: |-
  cd aaa
  cd bbb
  cd ccc
# 折りたたみスタイル >:改行をスペースに変換 -:最終行の改行コードを削除
 -shell: >-
  cd aaa
  cd bbb
  cd ccc
 

プレイブック構成

---
# 1play
 - host: all # Targetsセレクション:ターゲットノードの特定
   vars: # Varsセレクション:変数の設定
     xx: xx
   tasks: # Tasksセレクション:処理の定義
     - xx: xx
   handlers: # Handlersセレクション:実行制御処理
     - xx: xx

# 1play
 - host: server_01
   tasks:
     - xx: xx
0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?