diff --git a/playbooks/filter_plugins/genestack-filter.py b/ansible/filter_plugins/genestack-filter.py similarity index 100% rename from playbooks/filter_plugins/genestack-filter.py rename to ansible/filter_plugins/genestack-filter.py diff --git a/playbooks/ansible.cfg b/ansible/playbooks/ansible.cfg similarity index 100% rename from playbooks/ansible.cfg rename to ansible/playbooks/ansible.cfg diff --git a/playbooks/deploy-cinder-volumes-reference.yaml b/ansible/playbooks/deploy-cinder-volumes-reference.yaml similarity index 100% rename from playbooks/deploy-cinder-volumes-reference.yaml rename to ansible/playbooks/deploy-cinder-volumes-reference.yaml diff --git a/playbooks/host-setup.yml b/ansible/playbooks/host-setup.yml similarity index 100% rename from playbooks/host-setup.yml rename to ansible/playbooks/host-setup.yml diff --git a/playbooks/infra-deploy.yaml b/ansible/playbooks/infra-deploy.yaml similarity index 100% rename from playbooks/infra-deploy.yaml rename to ansible/playbooks/infra-deploy.yaml diff --git a/playbooks/inventory/flex-example.yaml b/ansible/playbooks/inventory/flex-example.yaml similarity index 100% rename from playbooks/inventory/flex-example.yaml rename to ansible/playbooks/inventory/flex-example.yaml diff --git a/playbooks/roles b/ansible/playbooks/roles similarity index 100% rename from playbooks/roles rename to ansible/playbooks/roles diff --git a/playbooks/templates/cinder-volume-usage-audit.service b/ansible/playbooks/templates/cinder-volume-usage-audit.service similarity index 100% rename from playbooks/templates/cinder-volume-usage-audit.service rename to ansible/playbooks/templates/cinder-volume-usage-audit.service diff --git a/playbooks/templates/cinder-volume-usage-audit.timer b/ansible/playbooks/templates/cinder-volume-usage-audit.timer similarity index 100% rename from playbooks/templates/cinder-volume-usage-audit.timer rename to ansible/playbooks/templates/cinder-volume-usage-audit.timer diff --git a/playbooks/templates/cinder-volume.service b/ansible/playbooks/templates/cinder-volume.service similarity index 100% rename from playbooks/templates/cinder-volume.service rename to ansible/playbooks/templates/cinder-volume.service diff --git a/playbooks/templates/sudoers b/ansible/playbooks/templates/sudoers similarity index 100% rename from playbooks/templates/sudoers rename to ansible/playbooks/templates/sudoers diff --git a/roles/host_setup/defaults/main.yml b/ansible/roles/host_setup/defaults/main.yml similarity index 100% rename from roles/host_setup/defaults/main.yml rename to ansible/roles/host_setup/defaults/main.yml diff --git a/roles/host_setup/handlers/main.yml b/ansible/roles/host_setup/handlers/main.yml similarity index 100% rename from roles/host_setup/handlers/main.yml rename to ansible/roles/host_setup/handlers/main.yml diff --git a/roles/host_setup/tasks/configure_hosts.yml b/ansible/roles/host_setup/tasks/configure_hosts.yml similarity index 100% rename from roles/host_setup/tasks/configure_hosts.yml rename to ansible/roles/host_setup/tasks/configure_hosts.yml diff --git a/roles/host_setup/tasks/main.yml b/ansible/roles/host_setup/tasks/main.yml similarity index 100% rename from roles/host_setup/tasks/main.yml rename to ansible/roles/host_setup/tasks/main.yml diff --git a/roles/host_setup/tasks/sysstat.yml b/ansible/roles/host_setup/tasks/sysstat.yml similarity index 100% rename from roles/host_setup/tasks/sysstat.yml rename to ansible/roles/host_setup/tasks/sysstat.yml diff --git a/roles/host_setup/templates/environment.j2 b/ansible/roles/host_setup/templates/environment.j2 similarity index 100% rename from roles/host_setup/templates/environment.j2 rename to ansible/roles/host_setup/templates/environment.j2 diff --git a/roles/host_setup/templates/modprobe.conf.j2 b/ansible/roles/host_setup/templates/modprobe.conf.j2 similarity index 100% rename from roles/host_setup/templates/modprobe.conf.j2 rename to ansible/roles/host_setup/templates/modprobe.conf.j2 diff --git a/roles/host_setup/templates/sysstat.cron.debian.j2 b/ansible/roles/host_setup/templates/sysstat.cron.debian.j2 similarity index 100% rename from roles/host_setup/templates/sysstat.cron.debian.j2 rename to ansible/roles/host_setup/templates/sysstat.cron.debian.j2 diff --git a/roles/host_setup/templates/sysstat.default.j2 b/ansible/roles/host_setup/templates/sysstat.default.j2 similarity index 100% rename from roles/host_setup/templates/sysstat.default.j2 rename to ansible/roles/host_setup/templates/sysstat.default.j2 diff --git a/roles/host_setup/templates/systemd-environment.j2 b/ansible/roles/host_setup/templates/systemd-environment.j2 similarity index 100% rename from roles/host_setup/templates/systemd-environment.j2 rename to ansible/roles/host_setup/templates/systemd-environment.j2 diff --git a/roles/host_setup/vars/ubuntu.yml b/ansible/roles/host_setup/vars/ubuntu.yml similarity index 100% rename from roles/host_setup/vars/ubuntu.yml rename to ansible/roles/host_setup/vars/ubuntu.yml diff --git a/bootstrap.sh b/bootstrap.sh index 83ac98b78..f2a9e1708 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -56,7 +56,7 @@ mkdir -p $GENESTACK_CONFIG/inventory/group_vars $GENESTACK_CONFIG/inventory/cred # Copy default k8s config test -d $GENESTACK_PRODUCT || error "Product Config $GENESTACK_PRODUCT does not exist here" -if [ $(find $GENESTACK_CONFIG/inventory -name *.yml 2>/dev/null |wc -l) -eq 0 ]; then +if [ $(find $GENESTACK_CONFIG/inventory -name \*.yaml -o -name \*.yml 2>/dev/null |wc -l) -eq 0 ]; then cp -r ${GENESTACK_PRODUCT}/* ${GENESTACK_CONFIG}/inventory fi diff --git a/docs/quickstart.md b/docs/quickstart.md index 847b54b0d..51cea7d3a 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -30,7 +30,7 @@ The ansible inventory is expected at `/etc/genestack/inventory` ``` shell source /opt/genestack/scripts/genestack.rc -cd /opt/genestack/playbooks +cd /opt/genestack/ansible/playbooks ansible-playbook host-setup.yml ``` diff --git a/scripts/genestack.rc b/scripts/genestack.rc index 738ae3021..12d5826bc 100644 --- a/scripts/genestack.rc +++ b/scripts/genestack.rc @@ -3,7 +3,7 @@ export GENESTACK_CONFIG="${GENESTACK_CONFIG:-/etc/genestack}" export SKIP_PROMPTS="${SKIP_PROMPTS:-false}" export ANSIBLE_FORKS="${ANSIBLE_FORKS:-24}" -export ANSIBLE_FILTER_PLUGINS="${ANSIBLE_FILTER_PLUGINS:-/opt/genestack/playbooks/filter_plugins}" +export ANSIBLE_FILTER_PLUGINS="${ANSIBLE_FILTER_PLUGINS:-/opt/genestack/ansible/filter_plugins}" export ANSIBLE_COLLECTION_FILE=${ANSIBLE_COLLECTION_FILE:-"ansible-collection-requirements.yml"} export ANSIBLE_INVENTORY="${ANSIBLE_INVENTORY:-${GENESTACK_CONFIG}/inventory}" export ANSIBLE_INVENTORY_IGNORE_REGEX="${ANSIBLE_INVENTORY_IGNORE_REGEX:-'artifacts,credentials'}"