Ansible Test - Playbook-linux-all


複数のサーバの環境構成をAnableで管理し、ファイル管理を最小時間+自動化+Human Error 0%に処理


linuxサーバグループテスト。shファイルテキストの変更


Target: linux-server Group

[Inventory]
[linux-server]
target1 ansible_host=172.22.3.1 ansible_ssh_pass=ansible ansible_user=ansible
target2 ansible_host=172.22.3.2 ansible_ssh_pass=ansible ansible_user=ansible
[fileupdate-playbook.yml]
- name: update test.sh
  hosts: linux-server
  tasks:
  - replace:
      path: /test/test.sh
      regexp: 'nohup java -Xmx512m -Xms512m'
      replace: 'nohup java -Xmx256m -Xms256m'

linuxサーバ全体が属するlinux-serverグループに対応するインスタンスをテストします.shファイルでの変更の完了