Skip to content

Commit

Permalink
Add hostfile manage option flag (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyphreak authored Jan 15, 2024
1 parent d046687 commit fc23fab
Show file tree
Hide file tree
Showing 23 changed files with 867 additions and 209 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
molecule:
name: molecule
runs-on: libvirt
runs-on: ubuntu-latest
strategy:
matrix:
scenario:
Expand Down
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: nephelaiio
name: mongodb
version: 0.2.0
version: 0.2.1
readme: README.md
authors:
- Ted Cook <[email protected]>
Expand Down
114 changes: 91 additions & 23 deletions molecule/install/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,74 +5,142 @@ dependency:
role-file: requirements.yml
requirements-file: requirements.yml
driver:
name: default
name: docker
platforms:
- name: mongodb-install-mongos01
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_mongos
- mongodb
- name: mongodb-install-mongos02
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_mongos
- mongodb
- name: mongodb-install-config01
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_config
- mongodb
- name: mongodb-install-config02
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_config
- mongodb
- name: mongodb-install-config03
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_config
- mongodb
- name: mongodb-install-shard01
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_shard1
- mongodb
- name: mongodb-install-shard02
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_shard1
- mongodb
- name: mongodb-install-shard03
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_shard1
- mongodb
provisioner:
name: ansible
config_options:
defaults:
callbacks_enabled: ansible.posix.profile_tasks
playbooks:
create: ../common/create.yml
prepare: ../common/prepare.yml
converge: ../common/install.yml
side_effect: ../common/install.yml
verify: ../common/verify.yml
destroy: ../common/destroy.yml
cleanup: ../common/cleanup.yml
config_options:
defaults:
callbacks_enabled: ansible.posix.profile_tasks
inventory:
hosts:
all:
vars:
mongodb_hosts_manage: false
verifier:
name: ansible
scenario:
prepare_sequence:
- prepare
converge_sequence:
- converge
destroy_sequence:
- destroy
cleanup_sequence:
- cleanup
test_sequence:
- dependency
- cleanup
- destroy
- create
- prepare
- converge
Expand Down
106 changes: 86 additions & 20 deletions molecule/offline/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,69 +5,135 @@ dependency:
role-file: requirements.yml
requirements-file: requirements.yml
driver:
name: default
name: docker
platforms:
- name: mongodb-offline-mongos01
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_mongos
- mongodb
- name: mongodb-offline-mongos02
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_mongos
- mongodb
- name: mongodb-offline-config01
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_config
- mongodb
- name: mongodb-offline-config02
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_config
- mongodb
- name: mongodb-offline-config03
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_config
- mongodb
- name: mongodb-offline-shard01
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_shard1
- mongodb
- name: mongodb-offline-shard02
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_shard1
- mongodb
- name: mongodb-offline-shard03
image: "${MOLECULE_KVM_IMAGE}"
image: "geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
pre_build_image: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /tmp
- /opt
groups:
- mongodb_shard1
- mongodb
provisioner:
name: ansible
playbooks:
create: ../common/create.yml
converge: ../common/offline.yml
destroy: ../common/destroy.yml
cleanup: ../common/cleanup.yml
config_options:
defaults:
callbacks_enabled: ansible.posix.profile_tasks
inventory:
hosts:
all:
vars:
mongodb_hosts_manage: false
verifier:
name: ansible
scenario:
prepare_sequence:
- prepare
converge_sequence:
- converge
destroy_sequence:
- destroy
cleanup_sequence:
- cleanup
test_sequence:
- dependency
- create
Expand Down
Loading

0 comments on commit fc23fab

Please sign in to comment.