added noted, restart, ping and modified cfg to grab a non-tracked password file
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
pass
|
||||||
|
*.swp
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
[defaults]
|
[defaults]
|
||||||
privatekeyfile = /home/dan/.ssh/id_rsa.pub
|
privatekeyfile = /home/dan/.ssh/id_rsa.pub
|
||||||
inventory = inventory
|
inventory = inventory
|
||||||
|
become_password_file = pass
|
||||||
|
|||||||
4
notes
Normal file
4
notes
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
- Ask ssh password: -k
|
||||||
|
- pass usename: -u
|
||||||
|
- Pass different Inventory file: -i
|
||||||
|
|
||||||
18
ping.yml
Normal file
18
ping.yml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- hosts: localhost
|
||||||
|
connection: local
|
||||||
|
gather_facts: false
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: create temp group
|
||||||
|
add_host:
|
||||||
|
name: '192.168.86.10'
|
||||||
|
groups: restart
|
||||||
|
|
||||||
|
- hosts: restart
|
||||||
|
tasks:
|
||||||
|
- name: restart
|
||||||
|
ping:
|
||||||
|
|
||||||
|
|
||||||
19
restart.yml
Normal file
19
restart.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- hosts: localhost
|
||||||
|
connection: local
|
||||||
|
gather_facts: false
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: create temp group
|
||||||
|
add_host:
|
||||||
|
name: '192.168.86.10'
|
||||||
|
groups: restart
|
||||||
|
|
||||||
|
- hosts: restart
|
||||||
|
tasks:
|
||||||
|
- name: restart
|
||||||
|
become: true
|
||||||
|
reboot:
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user