Skip to content

Commit

Permalink
feat: convert to FQCN
Browse files Browse the repository at this point in the history
This commit convert all the roles calls
to their corresponding fully qualified collection name.
  • Loading branch information
ccamacho committed Sep 27, 2021
1 parent e8b1552 commit 902f35b
Show file tree
Hide file tree
Showing 48 changed files with 125 additions and 100 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/distro_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ jobs:
sed -i -E "s/.*compute-01/#compute-01/g" ./hosts/cdk/inventory
sed -i -E "s/.*compute-02/#compute-02/g" ./hosts/cdk/inventory
sed -i -E "/service-01 ansible_host/ s/type=virtual/type=container/g" ./hosts/cdk/inventory
- name: Run the deployment for a container
- name: Run the deployment from a container
run: |
# There is no need to install the collection before this step.
# The collection is compiled and installed when we create
# the kubeinit container using the code in the current path.
sudo su <<EOF
whoami
podman build -t kubeinit/kubeinit .
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/docs_build_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ jobs:
sudo python3 -m pip install --upgrade setuptools
sudo python3 -m pip install --upgrade ansible-inventory-grapher
sudo python3 -m pip install --upgrade ansible-playbook-grapher
sudo python3 -m pip install --upgrade shyaml
- name: Install kubeinit's collection
run: |
cd kubeinit
rm -rf ~/.ansible/collections/ansible_collections/kubeinit/kubeinit
ansible-galaxy collection build -v --force --output-path releases/
ansible-galaxy collection install --force --force-with-deps releases/kubeinit-kubeinit-`cat galaxy.yml | shyaml get-value version`.tar.gz
cd ..
- name: Render the plantuml diagrams
run: |
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ jobs:
sudo python3 -m pip install --upgrade setuptools
sudo python3 -m pip install --upgrade ansible-inventory-grapher
sudo python3 -m pip install --upgrade ansible-playbook-grapher
sudo python3 -m pip install --upgrade shyaml
- name: Install kubeinit's collection
run: |
cd kubeinit
rm -rf ~/.ansible/collections/ansible_collections/kubeinit/kubeinit
ansible-galaxy collection build -v --force --output-path releases/
ansible-galaxy collection install --force --force-with-deps releases/kubeinit-kubeinit-`cat galaxy.yml | shyaml get-value version`.tar.gz
cd ..
- name: Render the plantuml diagrams
run: |
Expand Down
4 changes: 4 additions & 0 deletions ci/install_gitlab_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ if [ -f /etc/redhat-release ] || [ -f /etc/fedora-release ]; then
sudo yum install python3 python3-pip -y
sudo yum install nano git podman -y

# Configure git with some mock data
git config --global user.email "bot@kubeinit.com"
git config --global user.name "kubeinit-bot"

# ARA required packages
sudo yum install gcc python3-devel libffi-devel openssl-devel redhat-rpm-config -y
sudo yum install sqlite -y
Expand Down
4 changes: 2 additions & 2 deletions docs/src/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ from the project's root folder:
tasks:
- name: Run the prepare tasks
ansible.builtin.include_role:
name: "../../roles/kubeinit_prepare"
name: kubeinit.kubeinit.kubeinit_prepare
tasks_from: main.yml
- name: Clean the environment
ansible.builtin.include_role:
name: ../../roles/kubeinit_libvirt
name: kubeinit.kubeinit.kubeinit_libvirt
tasks_from: 10_cleanup
EOF
# Run the cleanup playbook
Expand Down
22 changes: 11 additions & 11 deletions kubeinit/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
tasks:
- name: task-prepare-hypervisors
ansible.builtin.include_role:
name: "../../roles/kubeinit_prepare"
name: kubeinit.kubeinit.kubeinit_prepare
tasks_from: prepare_hypervisors.yml
public: true

Expand All @@ -39,7 +39,7 @@
tasks:
- name: Prepare each hypervisor in the deployment
ansible.builtin.include_role:
name: "../../roles/kubeinit_prepare"
name: kubeinit.kubeinit.kubeinit_prepare
tasks_from: prepare_hypervisor.yml
public: true

Expand All @@ -50,42 +50,42 @@
tasks:
- name: task-prepare-environment
ansible.builtin.include_role:
name: "../../roles/kubeinit_prepare"
name: kubeinit.kubeinit.kubeinit_prepare
public: true
- name: task-cleanup-hypervisors
ansible.builtin.include_role:
name: "../../roles/kubeinit_prepare"
name: kubeinit.kubeinit.kubeinit_prepare
tasks_from: cleanup_hypervisors.yml
public: true
- name: task-run-validations
ansible.builtin.include_role:
name: "../../roles/kubeinit_validations"
name: kubeinit.kubeinit.kubeinit_validations
public: true
- name: task-create-network
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: create_network.yml
public: true
- name: task-create-services
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
public: true
- name: task-prepare-cluster
ansible.builtin.include_role:
name: "../../roles/kubeinit_{{ kubeinit_inventory_cluster_distro }}"
name: "kubeinit.kubeinit.kubeinit_{{ kubeinit_inventory_cluster_distro }}"
tasks_from: prepare_cluster.yml
public: true
- name: task-download-images
ansible.builtin.include_role:
name: "../../roles/kubeinit_libvirt"
name: kubeinit.kubeinit.kubeinit_libvirt
tasks_from: download_cloud_images.yml
public: true
- name: task-deploy-cluster
ansible.builtin.include_role:
name: "../../roles/kubeinit_{{ kubeinit_inventory_cluster_distro }}"
name: "kubeinit.kubeinit.kubeinit_{{ kubeinit_inventory_cluster_distro }}"
public: true
- name: task-post-deployment
ansible.builtin.include_role:
name: "../../roles/kubeinit_{{ kubeinit_inventory_cluster_distro }}"
name: "kubeinit.kubeinit.kubeinit_{{ kubeinit_inventory_cluster_distro }}"
tasks_from: post_deployment_tasks.yml
public: true
4 changes: 2 additions & 2 deletions kubeinit/playbooks/submariner-subctl-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
tasks:
- name: Run the prepare tasks
ansible.builtin.include_role:
name: "../../roles/kubeinit_prepare"
name: kubeinit.kubeinit.kubeinit_prepare
public: true

- name: Main playbook to deploy submariner
Expand All @@ -38,6 +38,6 @@
tasks:
- name: Verify submariner
ansible.builtin.import_role:
name: "../../roles/kubeinit_submariner"
name: kubeinit.kubeinit.kubeinit_submariner
tasks_from: 30_subctl_verify.yml
public: true
4 changes: 2 additions & 2 deletions kubeinit/playbooks/submariner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
tasks:
- name: Run the prepare tasks
ansible.builtin.include_role:
name: "../../roles/kubeinit_prepare"
name: kubeinit.kubeinit.kubeinit_prepare
public: true

- name: Main playbook to deploy submariner
Expand All @@ -38,5 +38,5 @@
tasks:
- name: Deploy submariner
ansible.builtin.import_role:
name: "../../roles/kubeinit_submariner"
name: kubeinit.kubeinit.kubeinit_submariner
public: true
2 changes: 1 addition & 1 deletion kubeinit/roles/kubeinit_apache/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

- name: Create systemd service for podman container
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: create_managed_service.yml
public: true
vars:
Expand Down
2 changes: 1 addition & 1 deletion kubeinit/roles/kubeinit_bind/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@

- name: Create systemd service for podman container
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: create_managed_service.yml
public: true
vars:
Expand Down
4 changes: 2 additions & 2 deletions kubeinit/roles/kubeinit_cdk/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- name: Prepare services if needed
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: prepare_services.yml
public: true
vars:
Expand All @@ -32,7 +32,7 @@

- name: Deploy the cluster nodes
ansible.builtin.include_role:
name: "../../roles/kubeinit_libvirt"
name: kubeinit.kubeinit.kubeinit_libvirt
tasks_from: deploy_ubuntu_guest.yml
public: yes
loop: "{{ groups['all_cluster_nodes'] + groups['extra_nodes'] }}"
Expand Down
2 changes: 1 addition & 1 deletion kubeinit/roles/kubeinit_cdk/tasks/post_configure_guest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- name: Prepare podman
ansible.builtin.include_role:
name: ../../roles/kubeinit_prepare
name: kubeinit.kubeinit.kubeinit_prepare
tasks_from: prepare_podman.yml
public: true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- block:
- name: Configure NFS
ansible.builtin.include_role:
name: "../../roles/kubeinit_nfs"
name: kubeinit.kubeinit.kubeinit_nfs
public: true
when: "'nfs' in kubeinit_cluster_hostvars.services"
vars:
Expand Down
4 changes: 2 additions & 2 deletions kubeinit/roles/kubeinit_cdk/tasks/prepare_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- name: Prepare environment if not prepared
ansible.builtin.include_role:
name: "../../roles/kubeinit_prepare"
name: kubeinit.kubeinit.kubeinit_prepare
public: true
vars:
environment_facts_set: "{{ kubeinit_cluster_facts_name is defined }}"
Expand All @@ -31,7 +31,7 @@

- name: Setup the cluster provision container
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: create_provision_container.yml
vars:
kubeinit_deployment_node_name: "{{ kubeinit_provision_service_node }}"
Expand Down
2 changes: 1 addition & 1 deletion kubeinit/roles/kubeinit_dnsmasq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

- name: Create systemd service for podman container
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: create_managed_service.yml
public: true
vars:
Expand Down
4 changes: 2 additions & 2 deletions kubeinit/roles/kubeinit_eks/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- name: Prepare services if needed
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: prepare_services.yml
public: true
vars:
Expand All @@ -32,7 +32,7 @@

- name: Deploy the cluster nodes
ansible.builtin.include_role:
name: "../../roles/kubeinit_libvirt"
name: kubeinit.kubeinit.kubeinit_libvirt
tasks_from: deploy_centos_guest.yml
public: yes
loop: "{{ groups['all_cluster_nodes'] }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
- block:
- name: Configure NFS
ansible.builtin.include_role:
name: "../../roles/kubeinit_nfs"
name: kubeinit.kubeinit.kubeinit_nfs
public: true
when: "'nfs' in kubeinit_cluster_hostvars.services"
vars:
Expand Down
4 changes: 2 additions & 2 deletions kubeinit/roles/kubeinit_eks/tasks/prepare_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- name: Prepare environment if not prepared
ansible.builtin.include_role:
name: "../../roles/kubeinit_prepare"
name: kubeinit.kubeinit.kubeinit_prepare
public: true
vars:
environment_facts_set: "{{ kubeinit_cluster_facts_name is defined }}"
Expand All @@ -31,7 +31,7 @@

- name: Setup the cluster provision container
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: create_provision_container.yml
vars:
kubeinit_deployment_node_name: "{{ kubeinit_provision_service_node }}"
Expand Down
2 changes: 1 addition & 1 deletion kubeinit/roles/kubeinit_haproxy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

- name: Create systemd service for podman container
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: create_managed_service.yml
public: true
vars:
Expand Down
4 changes: 2 additions & 2 deletions kubeinit/roles/kubeinit_k8s/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- name: Prepare services if needed
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: prepare_services.yml
public: true
vars:
Expand All @@ -32,7 +32,7 @@

- name: Deploy the cluster nodes
ansible.builtin.include_role:
name: "../../roles/kubeinit_libvirt"
name: kubeinit.kubeinit.kubeinit_libvirt
tasks_from: deploy_centos_guest.yml
public: yes
loop: "{{ groups['all_cluster_nodes'] }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
- block:
- name: Configure NFS
ansible.builtin.include_role:
name: "../../roles/kubeinit_nfs"
name: kubeinit.kubeinit.kubeinit_nfs
public: true
when: "'nfs' in kubeinit_cluster_hostvars.services"
vars:
Expand Down
4 changes: 2 additions & 2 deletions kubeinit/roles/kubeinit_k8s/tasks/prepare_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- name: Prepare environment if not prepared
ansible.builtin.include_role:
name: "../../roles/kubeinit_prepare"
name: kubeinit.kubeinit.kubeinit_prepare
public: true
vars:
environment_facts_set: "{{ kubeinit_cluster_facts_name is defined }}"
Expand All @@ -31,7 +31,7 @@

- name: Setup the cluster provision container
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: create_provision_container.yml
vars:
kubeinit_deployment_node_name: "{{ kubeinit_provision_service_node }}"
Expand Down
4 changes: 2 additions & 2 deletions kubeinit/roles/kubeinit_kid/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- name: Prepare services if needed
ansible.builtin.include_role:
name: "../../roles/kubeinit_services"
name: kubeinit.kubeinit.kubeinit_services
tasks_from: prepare_services.yml
public: true
vars:
Expand All @@ -32,7 +32,7 @@

- name: Deploy the cluster nodes
ansible.builtin.include_role:
name: "../../roles/kubeinit_libvirt"
name: kubeinit.kubeinit.kubeinit_libvirt
tasks_from: deploy_debian_guest.yml
public: yes
loop: "{{ groups['all_cluster_nodes'] }}"
Expand Down
2 changes: 1 addition & 1 deletion kubeinit/roles/kubeinit_kid/tasks/post_configure_guest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- name: Prepare podman
ansible.builtin.include_role:
name: ../../roles/kubeinit_prepare
name: kubeinit.kubeinit.kubeinit_prepare
tasks_from: prepare_podman.yml
public: true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- block:
- name: Configure NFS
ansible.builtin.include_role:
name: "../../roles/kubeinit_nfs"
name: kubeinit.kubeinit.kubeinit_nfs
public: true
when: "'nfs' in kubeinit_cluster_hostvars.services"
vars:
Expand Down
Loading

0 comments on commit 902f35b

Please sign in to comment.