inventory.yml
-------------------
---
[web]
ipaddress
group_vars/web.yml file
---------------------------
ansible_user: vagrant
ansible_password: vagrant
ansible_port: 5985
ansible_connection: winrm
ansible_winrm_cert_validation: ignore
ansible web -i inventory.yml -m win_ping
win_ping : just check the ping status and returnns json output.
setup: os information,ip,etc
instead of giving inventory file as command input.create entry in config file from base folder where running ansible
-------------------
ansible.cfg
----------------
[defaults]
inventory = ~/pluralsigh/inventory.yml
ansible web -m setup
ansible web -m raw -a "dir"
ansible web -m win_service -a "name=spooler"
ansible web -m win_service -a "name=spooler state=stopped" #yellow o/p state changed.
ansible web -m win_feature -a "name=Telnet-Client state=present"
-------------------
---
[web]
ipaddress
group_vars/web.yml file
---------------------------
ansible_user: vagrant
ansible_password: vagrant
ansible_port: 5985
ansible_connection: winrm
ansible_winrm_cert_validation: ignore
ansible web -i inventory.yml -m win_ping
win_ping : just check the ping status and returnns json output.
setup: os information,ip,etc
instead of giving inventory file as command input.create entry in config file from base folder where running ansible
-------------------
ansible.cfg
----------------
[defaults]
inventory = ~/pluralsigh/inventory.yml
ansible web -m setup
ansible web -m raw -a "dir"
ansible web -m win_service -a "name=spooler"
ansible web -m win_service -a "name=spooler state=stopped" #yellow o/p state changed.
ansible web -m win_feature -a "name=Telnet-Client state=present"
No comments:
Post a Comment