diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/converge.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/converge.yml index 959acf9..c561a5a 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/converge.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/converge.yml @@ -2,8 +2,7 @@ - name: Converge hosts: all gather_facts: false - - name: imports and executes the playbook under test ansible.builtin.import_playbook: ../../../launch_linux_container.yml vars: - lte_container_name: "{{ molecule_yml.platforms[0].name }}" + lte_container_name: '{{ molecule_yml.platforms[0].name }}' diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/destroy.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/destroy.yml index 1f2ddfc..da92c0b 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/destroy.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/destroy.yml @@ -5,17 +5,14 @@ gather_facts: false tasks: - name: find current container state - ansible.builtin.command: "lxc ls {{ item.name }}" + ansible.builtin.command: lxc ls {{ item.name }} register: container_state changed_when: false - with_items: "{{ molecule_yml.platforms }}" - + with_items: '{{ molecule_yml.platforms }}' - name: stop running containers ansible.builtin.shell: cmd: | lxc stop {{ item.name }} && \ lxc rm {{ item.name }} - when: - (container_state.results[0].rc == 0) and - ("RUNNING" in container_state.results[0].stdout) - with_items: "{{ molecule_yml.platforms }}" + when: (container_state.results[0].rc == 0) and ("RUNNING" in container_state.results[0].stdout) + with_items: '{{ molecule_yml.platforms }}' diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/verify.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/verify.yml index d50d0c2..a5855c8 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/verify.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/verify.yml @@ -4,12 +4,9 @@ gather_facts: false tasks: - name: find current container state - ansible.builtin.command: "lxc ls {{ item.name }}" + ansible.builtin.command: lxc ls {{ item.name }} register: container_state - with_items: "{{ molecule_yml.platforms }}" - + with_items: '{{ molecule_yml.platforms }}' - name: verify launched container is running assert: - that: - (container_state.results[0].rc == 0) and - ("RUNNING" in container_state.results[0].stdout) + that: (container_state.results[0].rc == 0) and ("RUNNING" in container_state.results[0].stdout) diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/galaxy.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/galaxy.yml index b014c32..6bbea70 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/galaxy.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/galaxy.yml @@ -1,3 +1,4 @@ +--- ### REQUIRED # The namespace of the collection. This can be a company/brand/organization or product namespace under which all # content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with @@ -12,22 +13,17 @@ version: 1.0.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md - # A list of the collection's content authors. Can be just the name or in the format 'Full Name (url) # @nicks:irc/im.site#channel' authors: -- your name - - + - your name ### OPTIONAL but strongly recommended # A short summary description of the collection description: your collection description - # Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only # accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' license: -- GPL-2.0-or-later - + - GPL-2.0-or-later # The path to the license file for the collection. This path is relative to the root of the collection. This key is # mutually exclusive with 'license' license_file: '' @@ -66,4 +62,3 @@ build_ignore: [] # 'omit_default_directives' is a boolean that controls whether the default directives are used. Mutually exclusive # with 'build_ignore' # manifest: null - diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/launch_linux_container.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/launch_linux_container.yml index f56d8ba..7f590e2 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/launch_linux_container.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/launch_linux_container.yml @@ -1,9 +1,8 @@ --- - - name: launch linux container hosts: localhost gather_facts: false tasks: - - name: Create a test container image template - ansible.builtin.import_role: - name: linux_container + - name: Create a test container image template + ansible.builtin.import_role: + name: linux_container diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/meta/runtime.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/meta/runtime.yml index 20f709e..91da2a7 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/meta/runtime.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/meta/runtime.yml @@ -1,52 +1,2 @@ --- -# Collections must specify a minimum required ansible version to upload -# to galaxy -# requires_ansible: '>=2.9.10' - -# 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/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/defaults/main.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/defaults/main.yml index 4b89a16..91da2a7 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/defaults/main.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/defaults/main.yml @@ -1,2 +1,2 @@ --- -# defaults file for linux_container +... diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/handlers/main.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/handlers/main.yml index a18d797..91da2a7 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/handlers/main.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/handlers/main.yml @@ -1,2 +1,2 @@ --- -# handlers file for linux_container +... diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/meta/main.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/meta/main.yml index c572acc..5d7099b 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/meta/main.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/meta/main.yml @@ -1,3 +1,4 @@ +--- galaxy_info: author: your name description: your role description @@ -15,7 +16,6 @@ galaxy_info: # - Apache-2.0 # - CC-BY-4.0 license: license (GPL-2.0-or-later, MIT, etc) - min_ansible_version: 2.1 # If this a Container Enabled role, provide the minimum Ansible Container version. @@ -38,7 +38,6 @@ galaxy_info: # - 1.0 # - 7 # - 99.99 - galaxy_tags: [] # List tags for your role here, one per line. A tag is a keyword that describes # and categorizes the role. Users find roles by searching for tags. Be sure to @@ -46,7 +45,6 @@ galaxy_info: # # NOTE: A tag is limited to a single word comprised of alphanumeric characters. # Maximum 20 tags per role. - dependencies: [] # List your role dependencies here, one per line. Be sure to remove the '[]' above, # if you add dependencies to this list. diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/tasks/main.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/tasks/main.yml index 4476738..9bd1910 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/tasks/main.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/tasks/main.yml @@ -1,15 +1,12 @@ --- - name: find current container state - ansible.builtin.command: "lxc ls {{ lte_container_name }}" + ansible.builtin.command: lxc ls {{ lte_container_name }} register: container_state changed_when: false - - name: launch debian bookworm linux container ansible.builtin.shell: cmd: | lxc launch \ images:debian/bookworm/cloud \ {{ lte_container_name }} - when: - (container_state.rc == 1) or - ("RUNNING" not in container_state.stdout) + when: (container_state.rc == 1) or ("RUNNING" not in container_state.stdout) diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/tests/test.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/tests/test.yml index f5aea12..66323ad 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/tests/test.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/tests/test.yml @@ -1,5 +1,4 @@ --- - hosts: localhost remote_user: root - roles: - - linux_container + roles: [linux_container] diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/vars/main.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/vars/main.yml index 05d0760..91da2a7 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/vars/main.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/roles/linux_container/vars/main.yml @@ -1,2 +1,2 @@ --- -# vars file for linux_container +...