Change default shell to CMD
This commit is contained in:
+2
-1
@@ -35,7 +35,8 @@ all:
|
|||||||
Gaming:
|
Gaming:
|
||||||
ansible_host: 192.168.1.13
|
ansible_host: 192.168.1.13
|
||||||
ansible_connection: ssh
|
ansible_connection: ssh
|
||||||
ansible_shell_type: powershell
|
ansible_user: sanjeet
|
||||||
|
ansible_shell_type: cmd
|
||||||
# host2:
|
# host2:
|
||||||
# ansible_host: <ip>
|
# ansible_host: <ip>
|
||||||
# ansible_user: <user>
|
# ansible_user: <user>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
- hosts: all
|
- hosts: all
|
||||||
become: yes
|
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
@@ -9,12 +8,14 @@
|
|||||||
update_cache: yes
|
update_cache: yes
|
||||||
upgrade: safe
|
upgrade: safe
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: "Updating and Upgrading Yum Packages"
|
- name: "Updating and Upgrading Yum Packages"
|
||||||
yum:
|
yum:
|
||||||
name: '*'
|
name: '*'
|
||||||
state: latest
|
state: latest
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
become: true
|
||||||
|
|
||||||
# For DNF-based systems (e.g., Fedora), you can add a similar task:
|
# For DNF-based systems (e.g., Fedora), you can add a similar task:
|
||||||
- name: "Updating and Upgrading Dnf Packages"
|
- name: "Updating and Upgrading Dnf Packages"
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
name: '*'
|
name: '*'
|
||||||
state: latest
|
state: latest
|
||||||
when: ansible_distribution == "Fedora"
|
when: ansible_distribution == "Fedora"
|
||||||
|
become: true
|
||||||
|
|
||||||
# For Windows Hosts
|
# For Windows Hosts
|
||||||
- name: Install all updates and reboot as many times as needed
|
- name: Install all updates and reboot as many times as needed
|
||||||
|
|||||||
Reference in New Issue
Block a user