From 153a11f6d7f86dd73227e834f13b5ae596181cd8 Mon Sep 17 00:00:00 2001 From: Adam Leiner <104371562+aleiner@users.noreply.github.com> Date: Fri, 28 Jun 2024 15:40:21 -0400 Subject: [PATCH] adding galaxy collection (#252) * adding galaxy collection * reverting change * adding all files * adjusting for galaxy * adjusting for galaxy --------- Co-authored-by: Adam Leiner --- CHANGELOG.md | 2 ++ galaxy.yml | 25 +++++++++++++++ meta/runtime.yml | 52 ++++++++++++++++++++++++++++++++ playbooks/site.yml | 23 ++++++++++++++ playbooks/testing.yml | 6 ++++ roles/cluster_manifest/README.md | 0 roles/rke2_agent/README.md | 0 roles/rke2_common/README.md | 0 roles/rke2_server/README.md | 0 roles/testing/README.md | 0 site.yml | 25 ++------------- testing.yml | 7 ++--- 12 files changed, 112 insertions(+), 28 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 galaxy.yml create mode 100644 meta/runtime.yml create mode 100644 playbooks/site.yml create mode 100644 playbooks/testing.yml create mode 100644 roles/cluster_manifest/README.md create mode 100644 roles/rke2_agent/README.md create mode 100644 roles/rke2_common/README.md create mode 100644 roles/rke2_server/README.md create mode 100644 roles/testing/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..4591f22a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,2 @@ +# CHANGELOG + diff --git a/galaxy.yml b/galaxy.yml new file mode 100644 index 00000000..05782a8c --- /dev/null +++ b/galaxy.yml @@ -0,0 +1,25 @@ +--- +namespace: rancherfederal +name: rke2_ansible +version: 0.0.2 +readme: README.md +authors: + - Rancher Government +description: Collection for rancherfederal/rke2-ansible + +license_file: 'LICENSE' + +tags: [infrastructure, linux, kubernetes, rancher, rke2] + +dependencies: + ansible.utils: 4.1.0 + +repository: https://github.com/rancherfederal/rke2-ansible +documentation: https://github.com/rancherfederal/rke2-ansible +homepage: https://github.com/rancherfederal/rke2-ansible +issues: https://github.com/rancherfederal/rke2-ansible/issues + +build_ignore: + - tarball_install/* + - testing + - .github diff --git a/meta/runtime.yml b/meta/runtime.yml new file mode 100644 index 00000000..d0f5b38e --- /dev/null +++ b/meta/runtime.yml @@ -0,0 +1,52 @@ +--- +# Collections must specify a minimum required ansible version to upload +# to galaxy +requires_ansible: '>=2.16.0' + +# Content that Ansible needs to load from another location or that has +# been deprecated/removed +# plugin_routing: +# action: +# redirected_plugin_name: +# redirect: ns.col.new_location +# deprecated_plugin_name: +# deprecation: +# removal_version: "4.0.0" +# warning_text: | +# See the porting guide on how to update your playbook to +# use ns.col.another_plugin instead. +# removed_plugin_name: +# tombstone: +# removal_version: "2.0.0" +# warning_text: | +# See the porting guide on how to update your playbook to +# use ns.col.another_plugin instead. +# become: +# cache: +# callback: +# cliconf: +# connection: +# doc_fragments: +# filter: +# httpapi: +# inventory: +# lookup: +# module_utils: +# modules: +# netconf: +# shell: +# strategy: +# terminal: +# test: +# vars: + +# Python import statements that Ansible needs to load from another location +# import_redirection: +# ansible_collections.ns.col.plugins.module_utils.old_location: +# redirect: ansible_collections.ns.col.plugins.module_utils.new_location + +# Groups of actions/modules that take a common set of options +# action_groups: +# group_name: +# - module1 +# - module2 diff --git a/playbooks/site.yml b/playbooks/site.yml new file mode 100644 index 00000000..6dac5fbe --- /dev/null +++ b/playbooks/site.yml @@ -0,0 +1,23 @@ +--- +- name: Server play + hosts: rke2_servers + any_errors_fatal: true + become: true + roles: + - role: rke2_server + serial: 5 + +- name: Agent play + hosts: rke2_agents + any_errors_fatal: true + become: true + roles: + - role: rke2_agent + serial: 10 + +- name: Cluster manifest play + hosts: rke2_servers + any_errors_fatal: true + become: true + roles: + - role: cluster_manifest diff --git a/playbooks/testing.yml b/playbooks/testing.yml new file mode 100644 index 00000000..8e6c89be --- /dev/null +++ b/playbooks/testing.yml @@ -0,0 +1,6 @@ +--- +- name: Testing play + hosts: all + become: yes + roles: + - role: testing diff --git a/roles/cluster_manifest/README.md b/roles/cluster_manifest/README.md new file mode 100644 index 00000000..e69de29b diff --git a/roles/rke2_agent/README.md b/roles/rke2_agent/README.md new file mode 100644 index 00000000..e69de29b diff --git a/roles/rke2_common/README.md b/roles/rke2_common/README.md new file mode 100644 index 00000000..e69de29b diff --git a/roles/rke2_server/README.md b/roles/rke2_server/README.md new file mode 100644 index 00000000..e69de29b diff --git a/roles/testing/README.md b/roles/testing/README.md new file mode 100644 index 00000000..e69de29b diff --git a/site.yml b/site.yml index 0d555ce9..8dd5315b 100644 --- a/site.yml +++ b/site.yml @@ -1,24 +1,3 @@ --- - -- name: Server play - hosts: rke2_servers - any_errors_fatal: true - become: true - roles: - - role: rke2_server - serial: 5 - -- name: Agent play - hosts: rke2_agents - any_errors_fatal: true - become: true - roles: - - role: rke2_agent - serial: 10 - -- name: Cluster manifest play - hosts: rke2_servers - any_errors_fatal: true - become: true - roles: - - role: cluster_manifest +- name: Playbook for rke2-ansible + import_playbook: playbooks/site.yml diff --git a/testing.yml b/testing.yml index 8e6c89be..c4d794d0 100644 --- a/testing.yml +++ b/testing.yml @@ -1,6 +1,3 @@ --- -- name: Testing play - hosts: all - become: yes - roles: - - role: testing +- name: Playbook for testing + import_playbook: playbooks/testing.yml