- hosts: webservers tasks: - name: Install Nginx apt: name=nginx state=present - name: Configure firewall ufw: rule=allow port=80 - name: Ensure Nginx is running service: name=nginx state=started
package { 'php': ensure => installed, } service { 'apache2': ensure => running, enable => true, } file { '/var/www/html/index.php': ensure => file, mode => '0644', owner => 'www-data', group => 'www-data', source => 'puppet:///modules/myapp/index.php', }
define host { use linux-server host_name server1 alias Bare Metal Server 1 address 192.168.1.10 } define service { use generic-service host_name server1 service_description Disk Space Usage check_command check_disk!20%!10% }
groups: - name: node_alerts rules: - alert: HighCpuUsage expr: node_cpu_seconds_total{mode='idle'} < 20 for: 5m labels: severity: warning annotations: summary: 'CPU usage on server1 is high'
provider 'baremetal' { endpoint = 'https://api.baremetal.example.com' } resource 'baremetal_server' 'web' { name = 'web-server-1' image = 'ubuntu-20.04' flavor = 's1.large' network { ip = '192.168.1.100' } }
bare metal server, Ansible, Puppet, Nagios, Prometheus, server monitoring, configuration management, server automation, Kubernetes, Terraform