Skip to content

Commit

Permalink
ansible
Browse files Browse the repository at this point in the history
  • Loading branch information
yerlaser committed Apr 17, 2024
1 parent b6f44dd commit cb159a1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ansible_puppet/commands.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
List repositories
apt-cache policy | grep http

OpenSSL
Check that key matches certificate
openssl rsa -modulus -noout -in myserver.{key,crt} | openssl md5

Check certificate information
echo | openssl s_client -showcerts -connect localhost:443 2>/dev/null | openssl x509 -inform pem -noout -text | head -n 13
17 changes: 17 additions & 0 deletions ansible_puppet/reboot_hosts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ansible-playbook -i hosts.txt -K reboot_hosts.yaml
- name: Reboot servers one by one
hosts: all
serial: 1
# become: true
# become_method: sudo
any_errors_fatal: true
tasks:
# - name: Reboot
# ansible.builtin.reboot:
# reboot_timeout: 1200
- name: Check if service is running
ansible.builtin.command:
cmd: systemctl status <service>
- name: Pause
pause:
minutes: 30

0 comments on commit cb159a1

Please sign in to comment.