ansible examples

Posted by ronald on februari 3, 2021 in Ansible, RHEL |
Ansible fun 1
---

- hosts: all
  become: yes
  vars:
    selinux_policy: targeted
    selinux_state: enforcing
    haproxy_backend_balance_method: 'roundrobin'
    haproxy_backend_servers:
      - name: node1
        address: 192.168.4.201:80
      - name: node2
        address: 192.168.4.202:80
      - name: node3
        address: 192.168.4.203:80
    firewall:
      - {​​​​​​​ service: 'ssh', state: 'enabled' }​​​​​
      - {​​​​​​​ service: 'http', state: 'enabled' }​​​​
      - {​​​​​​​ service: 'cockpit', state: 'enabled' }​​​
​​​​      - {​​​​​​​ service: 'dhcpv6-client', state: 'enabled' }​​​​
 ​​​   roles:
      - linux-system-roles.selinux
      - linux-system-roles.firewall
      - {​​​​​​​ role: geerlingguy.haproxy, when: '"controlhost" in group_names' }​​​​​
      - {​​​​​​​ role: geerlingguy.apache, when: '"nodes" in group_names' }​​​​​​​

Copyright © 2012-2021 Dutch Ronaldo All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.