Skip to content

Commit

Permalink
Move to nephelaiio.plugins collection
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyphreak committed Nov 13, 2023
1 parent 6f4b0a3 commit 61b81bf
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 14 deletions.
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ GITHUB_ORG = $$(echo ${GITHUB_REPOSITORY} | cut -d/ -f 1)
GITHUB_REPO = $$(echo ${GITHUB_REPOSITORY} | cut -d/ -f 2)
REQUIREMENTS = requirements.yml
ROLE_DIR = roles
PLUGIN_DIR = plugins
ROLE_FILE = roles.yml
COLLECTION_NAMESPACE = $$(yq '.namespace' < galaxy.yml)
COLLECTION_NAME = $$(yq '.name' < galaxy.yml)
Expand All @@ -29,20 +28,13 @@ lint: install

requirements: install
@rm -rf ${ROLE_DIR}/*
@rm -rf ${PLUGIN_DIR}/*
@poetry run ansible-galaxy role install \
--force --no-deps \
--roles-path ${ROLE_DIR} \
--role-file ${ROLE_FILE}
@poetry run ansible-galaxy collection install \
--force-with-deps .
@\grep -Rl "nephelaiio\.plugins" ${ROLE_DIR} | xargs -rL 1 sed -ie 's/nephelaiio\.plugins/nephelaiio.mongodb.plugins/g'
@cp -a ${ROLE_DIR}/plugins/filter_plugins ${PLUGIN_DIR}/filter
@cp -a ${ROLE_DIR}/plugins/test_plugins ${PLUGIN_DIR}/test
@\grep -Rl "nephelaiio\.mongodb_repo" ${ROLE_DIR} | xargs -rL 1 sed -ie 's/nephelaiio\.mongodb_repo/nephelaiio.mongodb.repo/g'
@\grep --exclude-dir ${ROLE_DIR}/plugins sorted_get -Rl ${ROLE_DIR} | xargs -rL 1 sed -ie 's/sorted_get/nephelaiio.mongodb.sorted_get/g'
@\grep --exclude-dir ${ROLE_DIR}/plugins map_format -Rl ${ROLE_DIR} | xargs -rL 1 sed -ie 's/map_format/nephelaiio.mongodb.map_format/g'
@\grep --exclude-dir ${ROLE_DIR}/plugins split_with -Rl ${ROLE_DIR} | xargs -rL 1 sed -ie 's/split_with/nephelaiio.mongodb.split_with/g'
@\find ./ -name "*.ymle*" -delete

build: requirements
Expand Down
3 changes: 2 additions & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ license:
tags:
- mongodb
- mongos
dependencies: {}
dependencies:
"nephelaiio.mongodb": "*"
repository: http://github.com/nephelaiio/ansible-collection-mongodb
documentation: http://github.com/nephelaiio/ansible-collection-mongodb
homepage: http://github.com/nephelaiio/ansible-collection-mongodb
Expand Down
3 changes: 2 additions & 1 deletion playbooks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
- name: Deploy mongodb config replicaset
hosts: "{{ mongodb_config | default('mongodb_config') }}"
become: true
collections:
- nephelaiio.plugins
roles:
- nephelaiio.mongodb.plugins
- nephelaiio.mongodb.repo
- nephelaiio.mongodb.mongodb
vars:
Expand Down
2 changes: 2 additions & 0 deletions playbooks/mongos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- name: Deploy mongodb mongos servers
hosts: "{{ mongodb_mongos | default('mongodb_mongos') }}"
become: true
collections:
- nephelaiio.plugins
roles:
- nephelaiio.mongodb.repo
- nephelaiio.mongodb.mongos
Expand Down
3 changes: 2 additions & 1 deletion playbooks/shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
- name: Deploy mongodb shard replicaset
hosts: "{{ mongodb_shard | default('mongodb_shard') }}"
become: true
collections:
- nephelaiio.plugins
roles:
- nephelaiio.mongodb.plugins
- nephelaiio.mongodb.repo
- nephelaiio.mongodb.mongodb
vars:
Expand Down
1 change: 1 addition & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ collections:
- name: nephelaiio.mongodb
source: .
type: dir
- name: nephelaiio.plugins
- name: community.mongodb
3 changes: 0 additions & 3 deletions roles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ roles:
src: https://github.com/wpnops/ansible-role-mongodb.git
version: 0.1.5
scm: git
- name: plugins
src: https://github.com/nephelaiio/ansible-role-plugins.git
version: 2.0.8

0 comments on commit 61b81bf

Please sign in to comment.