Browse Source

working example

main
dschier 7 months ago
parent
commit
da58e56fcb
  1. 1
      .vagrant/machines/lb01/libvirt/action_provision
  2. 1
      .vagrant/machines/lb01/libvirt/box_meta
  3. 1
      .vagrant/machines/lb01/libvirt/creator_uid
  4. 1
      .vagrant/machines/lb01/libvirt/id
  5. 1
      .vagrant/machines/lb01/libvirt/index_uuid
  6. 27
      .vagrant/machines/lb01/libvirt/private_key
  7. 1
      .vagrant/machines/lb01/libvirt/synced_folders
  8. 1
      .vagrant/machines/lb01/libvirt/vagrant_cwd
  9. 3
      .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory
  10. 9
      .vagrant/rgloader/loader.rb
  11. 6
      requirements.yml
  12. 8
      tasks/main.yml
  13. 0
      templates/haproxy.cfg.j2
  14. 4
      tests/test.yml

1
.vagrant/machines/lb01/libvirt/action_provision

@ -1 +0,0 @@
1.5:cf74901d-39d5-47cd-adcd-bbdc44a88332

1
.vagrant/machines/lb01/libvirt/box_meta

@ -1 +0,0 @@
{"name":"fedora/34-cloud-base","version":"34.20210423.0","provider":"libvirt","directory":"boxes/fedora-VAGRANTSLASH-34-cloud-base/34.20210423.0/libvirt"}

1
.vagrant/machines/lb01/libvirt/creator_uid

@ -1 +0,0 @@
1000

1
.vagrant/machines/lb01/libvirt/id

@ -1 +0,0 @@
cf74901d-39d5-47cd-adcd-bbdc44a88332

1
.vagrant/machines/lb01/libvirt/index_uuid

@ -1 +0,0 @@
35f14c8cc4fd4d869900e2af32a30b55

27
.vagrant/machines/lb01/libvirt/private_key

@ -1,27 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAoskrvpVXkG3L7i1361m1abG623R1B9MVzNjggqUi25xIz+ma
AbyVfbmrt86JwhzkOAc0mi+npO28EHOClCsv+NgNLQcD13odKsijKPbK5JN6C7VC
+g6TEQwk83mmLQ2nZGAAnk8cXAfq0swA1YqbbWKRT9UN72bvn22wBt5VZVrUtizc
ldAvDXjY6syqGoZQpb2Iq2e3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TJV9oYZMQmyENXR249wzxSJgRUJqd86QUDbI/2KFAAcGZAaQXA5HzEiqTYLYU4
lkJM6DZxnakmxUhYo1UNYDK1rSlYAXqhjDYNXeoUwh0lDtl13TBkkq0tPRbi4Ljt
opsBAoGAYo1vAHqSU04IpM2mqSekFvT5Pj27nQEfy0o2JzipFJq/7sdPSPykEyCj
eFE03YjY7JPvkcz2mM2ng+0N1rfLl2h4tX0ncx2T/4vEqrvmlpEUd+o1UR7vYhN2
gpo+WqJRoBbykitMgfioeXDVa5HpLJUdv7o+/X/E9lfO7xjN2qI=
-----END RSA PRIVATE KEY-----

1
.vagrant/machines/lb01/libvirt/synced_folders

@ -1 +0,0 @@
{"rsync":{"/vagrant":{"type":"rsync","guestpath":"/vagrant","hostpath":"/var/home/dschier/Projects/dschier/haproxy","disabled":false,"__vagrantfile":true,"owner":"vagrant","group":"vagrant"},"/etc/ansible/roles/haproxy":{"type":"rsync","guestpath":"/etc/ansible/roles/haproxy","hostpath":"/var/home/dschier/Projects/dschier/haproxy","disabled":false,"__vagrantfile":true,"owner":"vagrant","group":"vagrant"}}}

1
.vagrant/machines/lb01/libvirt/vagrant_cwd

@ -1 +0,0 @@
/var/home/dschier/Projects/dschier/haproxy

3
.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory

@ -1,3 +0,0 @@
# Generated by Vagrant
lb01 ansible_ssh_host=192.168.122.12 ansible_ssh_port=22 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='/var/home/dschier/Projects/dschier/haproxy/.vagrant/machines/lb01/libvirt/private_key'

9
.vagrant/rgloader/loader.rb

@ -1,9 +0,0 @@
# This file loads the proper rgloader/loader.rb file that comes packaged
# with Vagrant so that encoded files can properly run with Vagrant.
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
require File.expand_path(
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
else
raise "Encoded files can't be read outside of the Vagrant installer."
end

6
requirements.yml

@ -1,2 +1,6 @@
collections:
- name: "ansible.posix"
- name: "ansible.posix"
roles:
- src: "https://code.while-true-do.io/dschier/haproxy"
scm: "git"

8
tasks/main.yml

@ -9,8 +9,8 @@
- name: "Manage haproxy Configuration"
ansible.builtin.template:
src: "haproxy.conf.j2"
dest: "/etc/haproxy/haproxy.conf"
src: "haproxy.cfg.j2"
dest: "/etc/haproxy/haproxy.cfg"
owner: "root"
group: "root"
mode: 0644
@ -23,7 +23,7 @@
state: 1
become: true
when:
- " ! haproxy_workaround | bool"
- "not haproxy_workaround | bool"
- name: "Manage haproxy SELinux booleans"
ansible.builtin.command:
@ -37,4 +37,4 @@
name: "haproxy.service"
state: "started"
enabled: true
become: true
become: true

0
templates/haproxy.conf.j2 → templates/haproxy.cfg.j2

4
tests/test.yml

@ -1,5 +1,5 @@
---
- hosts: "localhost"
- hosts: "all"
tasks:
@ -7,4 +7,4 @@
ansible.builtin.import_role:
name: "haproxy"
vars:
- haproxy_workaround: false
- haproxy_workaround: true

Loading…
Cancel
Save