LoginSignup
1
0

More than 3 years have passed since last update.

AWS上のWindowsServerに対して、ローカルmacからansibleを実行 #3 タイムゾーン用のplaybook

Posted at

タイムゾーン変更用のplaybook。
マニュアルは、https://docs.ansible.com/ansible/latest/modules/win_timezone_module.html

setTimeZone.yml
---
- hosts:
  - windows  # インベントリファイルで指定した名前

  tasks: 
  - name: set time zone(Tokyo)
    win_timezone: 
        timezone: Tokyo Standard Time

timezoneは必須。どんなタイムゾーンが使えるかは、
https://msdn.microsoft.com/en-us/library/ms912391.aspx
でわかる。

以下コマンドで実行。
ansible-playbook -i ./ansible/hosts ./ansible/setTimeZone.yml

コマンド実行結果

PLAY [windows] ************************************************************************************************************************

TASK [Gathering Facts] ****************************************************************************************************************
ok: [ホスト名]

TASK [set time zone(Tokyo)] ***********************************************************************************************************
changed: [ホスト名]

PLAY RECAP ****************************************************************************************************************************
ホスト名 : ok=2    changed=1    unreachable=0    failed=0

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