diff options
| author | boom2 <blizzack@blizzack.com> | 2023-12-14 17:24:25 -0500 |
|---|---|---|
| committer | boom2 <blizzack@blizzack.com> | 2023-12-14 17:24:25 -0500 |
| commit | f30709d7dbe88d82c4df66c476db36cb5c0ce903 (patch) | |
| tree | ca861d7aa3e30c73a4fefeb9186f221cf15a8ff5 /ansible-practice/system/09-playbook-copy-system-files.yml~ | |
| parent | d8a7729358a2fd3b911022e45d0197fda3e5da94 (diff) | |
- add "new_host" role for system setup
- no longer use "all" to mention all hosts in playbooks
- update of hosts file to now use localhost as "test"
Diffstat (limited to 'ansible-practice/system/09-playbook-copy-system-files.yml~')
| -rw-r--r-- | ansible-practice/system/09-playbook-copy-system-files.yml~ | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ansible-practice/system/09-playbook-copy-system-files.yml~ b/ansible-practice/system/09-playbook-copy-system-files.yml~ new file mode 100644 index 0000000..17b0f00 --- /dev/null +++ b/ansible-practice/system/09-playbook-copy-system-files.yml~ @@ -0,0 +1,32 @@ +# reboot a host +# https://www.freekb.net/Article?id=3078 +# https://www.freekb.net/Article?id=2395 +# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/reboot_module.html +# +# - will need to find another option for reboot cuz this was a wonky behavior from ansible +# - it asked me to enter my passphrase 5 times before actually took properly +# +# had to run the command like so: +# +# ansible-playbook 11-playbook-reboot.yml --ask-become-pass +# +# -or- +# +# ansible-playbook 11-playbook-reboot.yml -K +# +# -or- +# +# ansible-playbook 11-playbook-reboot.yml --become -K +# + +--- +- name: "08 - custom ansible - backup system files" + hosts: all + tasks: + - name: reboot a host + ansible.builtin.reboot: + msg: "reboot initiated by ansible" + connect_timeout: 5 + post_reboot_delay: 30 + become: yes +...
\ No newline at end of file |
