This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sun Feb 7 18:57:19 UTC 2021 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: OS update and install docker | |
hosts: localhost | |
become: yes | |
tasks: | |
- name: Remove useless packages from the cache | |
apt: | |
autoclean: yes | |
- name: remove unrequired packages | |
apt: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## PLaybook is used to create or delete swapfile | |
## Author: Maithili Peetani | |
--- | |
- hosts: all | |
gather_facts: yes | |
become: yes | |
vars_files: | |
- swapfile_vars.yml | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
become: yes | |
vars: | |
package_name: "rabbitmq-server" | |
tasks: | |
## with package_facts ## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
USR='username' | |
for host in $(cat host_list) | |
do | |
sshpass -f pd_file ssh -q -o BatchMode=yes -o StrictHostKeyChecking=no -o ConnectTimeout=5 ${USR}@${host} exit | |
let ret_code=$? | |
if [ $ret_code -eq 5 ]; then | |
echo "${i} Connection Refused!" $ret_code |