When you run an Ansible playbook from the command line, you get messages printed to standard output (stdout). Ansible can only have a single callback responsible for handling stdout. The default callback is familiar to anyone who has run a playbook, but you can change this with thestdout_c...
---driver:name:digitaloceanprovisioner:name:ansible_playbookhosts:test-kitchenplaybook:./playbook.ymlverifier:name:inspecplatforms:-name:ubuntu-18driver_config:ssh_key:PATH_TO_YOUR_PRIVATE_SSH_KEYtags:-inspec-testingregion:fra1size:1gbprivate_networking:falseverifier:inspec_tests:-test/integrati...
Stupid Ansible tips Some useful Ansible hints I had collected over time from around the web. 2021-06-08 02:21 How to reboot HP iLO 5 from command line Something from the old notes. It’s simple and straight forward, and iLO sucks in my opinion - syntax-wise. Anyways, to reboot ...
Port scanning is a common technique used by crackers to identify active hosts and open ports on a network. Once a vulnerability is discovered, it is exploited in order to gain access to the system. A wise sysadmin needs to check how his or her systems are seen by outsiders, and make sur...
I am using Ansible to move logs to backup directory (using shell module, mv command). mv command fails if there are no files to move. By default, it causes whole Ansible play to fail. I can proceed with play, even if task fails (ignore_errors: yes) I am not satisfied with t...
"sleep 5 & reboot"async:1poll:0- name:Wait for the reboot and reconnectwait_for:port:22host:'{{ (ansible_ssh_host|default(ansible_host))|default(inventory_hostname) }}'search_regex:OpenSSHdelay:10timeout:60connection:local- name:Check the Uptime of the serversshell:"uptime"register:...
static HTML website. For example, you had to make these instances temporary, and booting up these instances with all required software and services automatically on the fly is not a trivial task. However, it is doable, especially if you use Docker containers, or at least Chef or Ansible. ...
Day-to-day operational support where a set number of metrics are to be monitored With that said, let’s start. Don’t Make Manual Changes to postgresql.conf Any changes in the postgresql.conf file should be made using a configuration management system like Puppet, Ansible, or Chef. This en...
There isn't anything new there, so next try thejournalctlcommand. You can follow the logs in one terminal as you run an action in another terminal. To do so, runjournalctllike this: $sudojournalctl-xef Use a few hard returns to get a clear break between the old logs and where the new...
You have to enable the debugging setting, which is off by default. Next, you can utilize the debugger keyword, as in this example from theAnsible docs: -name:Executeacommandansible.builtin.command:"false"debugger:on_failed Enable it globally in theansible.cfgfile in the[defaults]section: ...