Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Contributors to the collection should take their time to read these guidelines,
in order to avoid certain common pitfalls and needless frustration during code review.

These guidelines may change, depending on evolution of the project.
However, all changes should be perfomed with consideration for other developers
However, all changes should be performed with consideration for other developers
workflow and for projects using edpm-ansible collection.

General recommendation
++++++++++++++++++++++

Test your code locally, if it is at all possible, to shorten the development loop
and minimize unnecessary use of CI. Before commiting your changes, run `pre-commit`_
and minimize unnecessary use of CI. Before committing your changes, run `pre-commit`_
check to avoid needless issues with style, such as indentation.

.. note::
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contributing_playbooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Playbook must not duplicate other playbooks.
If a newly developed playbook requires functionality not already present in existing
roles, a new role should be submitted in the same PR implementing it.

If possible, playbooks should not use tasks directly, only trough a role.
If possible, playbooks should not use tasks directly, only through a role.

Playbooks must use following basic layout. Exposing variables, `edpm_override_hosts`,
`edpm_max_fail_percentage` and `edpm_any_errors_fatal`.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/contributing_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Therefore, we will use the term **plugin** to denote the general set of auxiliar
and **module** for those plugins which can be used to perform operations on the target machine.

Before developing plugins first check if the use case isn't already supported by
an existing plugin in either the `ansible` or `commmunity` name space. Alternatively, it may be possible
an existing plugin in either the `ansible` or `community` name space. Alternatively, it may be possible
to derive a new plugin, from an existing counterpart. However, this may cause issues with long term maintenance,
as the parent plugin characteristics may change over time.

Expand Down Expand Up @@ -96,7 +96,7 @@ Check mode
~~~~~~~~~~

Modules which do not affect the target machine must be marked as available for `check mode`_.
At the same time, a module running in check mode is resposible for not performing any
At the same time, a module running in check mode is responsible for not performing any
actions that may affect the target machine.

Plugin testing
Expand Down
6 changes: 3 additions & 3 deletions docs/source/contributing_roles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ All roles must have an `argument specification`_ metadata, for all of their endp
in the `roles/<NEWROLENAME>/meta/argument_specs.yml` file.

Argument specs allow for validity checks on arguments passed to the role in playbooks,
while also providing bulk of the information neccessary for automated doc build.
while also providing bulk of the information necessary for automated doc build.
This both prevents unnecessary bugs, and simplifies documentation upkeep.

Argument specification must contain definition of argument types, defaults and descriptions.
Expand Down Expand Up @@ -119,7 +119,7 @@ Tasks

All tasks of the role must accurately report whether or not they have performed
changes on the target machine. This is especially important when tasks invoke
modules which do not properly implement change reporting, for example `ansible.buildin.cmd`.
modules which do not properly implement change reporting, for example `ansible.builtin.cmd`.

In these cases, `changed_when`_ and `failed_when`_ constructs must be used.
Just like other `conditionals`_, the conditionals used to define change and failure should
Expand All @@ -144,7 +144,7 @@ like dictionaries or lists, in order to strain on human parser.
Privilege escalation
++++++++++++++++++++

`Privilege escalation`_, or `become`, must be used only when neccessary.
`Privilege escalation`_, or `become`, must be used only when necessary.
Only tasks that have to be executed under root privileges should receive them.
Even if there are multiple tasks requiring root privileges, separated by others that can operate
under normal user, the entire role must not operate under them.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/playbooks/install_os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Uses external `timesync` role from `system roles collection`_ to both install an
Time service configuration
--------------------------

Variables of the `timesync`_ system role can be overriden in a standard ansible way,
Variables of the `timesync`_ system role can be overridden in a standard ansible way,
while respecting resolution order. Default values are set in the `install_os` playbook,
while allowing for override.

Expand Down
4 changes: 2 additions & 2 deletions docs/source/roles/role-edpm_tripleo_cleanup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Role - edpm_tripleo_cleanup
================================

Role stops and disables all systemd units enumerated to it.
If the role doesn't recieve list of services, it will instead stop and disable
If the role doesn't receive list of services, it will instead stop and disable
all units containing string "tripleo" in their name.

This way we can effectivelly prevent any leftovers of original tripleo based
This way we can effectively prevent any leftovers of original tripleo based
deployment from interfering with post-adoption setup.

.. include::
Expand Down
4 changes: 2 additions & 2 deletions docs/source/testing_roles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Creating a VM to run molecule

The
`edpm_libvirt <https://github.com/openstack-k8s-operators/edpm-ansible/tree/main/roles/edpm_libvirt>`_
molecule senario uses the delegated driver to run against localhost.
molecule scenario uses the delegated driver to run against localhost.
Thus, it's better to run it inside an ephemeral virtual machine as
it cannot be run insider of a container.

Expand Down Expand Up @@ -94,7 +94,7 @@ following.
Writing molecule tests
~~~~~~~~~~~~~~~~~~~~~~

Molecule scenario configutration is made up of several files, all
Molecule scenario configuration is made up of several files, all
stored in the `molecule/<scenario>/` directory.

* `molecule/default/molecule.yml` (mandatory):
Expand Down
10 changes: 5 additions & 5 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ Using roles in playbooks
++++++++++++++++++++++++

Plabyooks should import roles whole, not only import specific subset of tasks.
Situations when this is neccessary indicate inappropriate problem decomposition
Situations when this is necessary indicate inappropriate problem decomposition
and could point towards need for refactoring.

Roles must be invoked using their FQN, in order to preven potential collisions
Roles must be invoked using their FQN, in order to prevent potential collisions
and to clarify collection dependencies.

Only variables that don't have appropriate defaults should be set explicitly
in the role invokation. The notable exception being repeated use of the same
in the role invocation. The notable exception being repeated use of the same
role within the playbook, when it may be more beneficial, from the maintenance perspective,
to explicitly set other variables.

The role invokation in a playbook is analogous to call of function in other languages.
The role invocation in a playbook is analogous to call of function in other languages.
However, output of one role shouldn't impact operations of other roles, not including
cases when role exectuion fails.
cases when role execution fails.

Roles must not be imported using the plain `include`_ module, as it has been deprecated.
Instead the `roles`_ keyword should be used on the playbook level when possible.
Expand Down
2 changes: 1 addition & 1 deletion plugins/filter/haskey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DOCUMENTATION:
name: haskey
author: "EDPM team"
version_added: 2.9
short_description: Retrun dictionaries with given key
short_description: Return dictionaries with given key
description: |
This filter will take a list of dictionaries (data)
and will return the dictionaries which have a certain key given
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/edpm_container_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def manage_container(self, name, config):
if 'remove' in opts:
opts['rm'] = opts.pop('remove')
if 'restart' in opts:
# NOTE(mwhahaha): converation from edpm format to podman as
# NOTE(mwhahaha): conversion from edpm format to podman as
# systemd handles this restart config
opts['restart'] = False
opts['state'] = 'created'
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/edpm_derive_pci_passthrough_devicespec.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
required: true
sriov_phydev_map:
description:
- Comma seperated SR-IOV <-> phydev mappings
- Comma separated SR-IOV <-> phydev mappings
type: str
required: false
default: ''
Expand Down Expand Up @@ -114,9 +114,9 @@ def get_pci_field_val(prop, maxval, hex_value):
try:
v = int(prop, 16)
except ValueError:
raise InvalidConfigException('Invalid PCI address specififed {!r}'.format(prop))
raise InvalidConfigException('Invalid PCI address specified {!r}'.format(prop))
if v > maxval:
raise InvalidConfigException('PCI address specififed {!r} is out of range'.format(prop))
raise InvalidConfigException('PCI address specified {!r} is out of range'.format(prop))
return hex_value % v


Expand All @@ -133,7 +133,7 @@ def get_pciaddr_dict_from_usraddr(pci_addr):
if dbs:
dbs_fields = dbs.split(':')
if len(dbs_fields) > 3:
raise InvalidConfigException('Invalid PCI address specififed {!r}'.format(pci_addr))
raise InvalidConfigException('Invalid PCI address specified {!r}'.format(pci_addr))
# If we got a partial address like ":00.", we need to turn this
# into a domain of ANY, a bus of ANY, and a slot of 00. This code
# allows the address,bus and/or domain to be left off
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_bootstrap/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ edpm_bootstrap_download_delay: "{{ edpm_download_delay | default(60) }}"
# number of retries for download tasks
edpm_bootstrap_download_retries: "{{ edpm_download_retries | default(5) }}"

# List of packages that are requred to bootstrap EDPM.
# List of packages that are required to bootstrap EDPM.
edpm_bootstrap_packages_bootstrap:
- driverctl
- lvm2
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_bootstrap/facts/bootc.fact
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BOOTC_SYSTEM="false"
BOOTC_PACKAGE=$(rpm -qa | grep bootc)

# If the system isn't using bootc, we can exit early here since the
# RPM wont be installed.
# RPM won't be installed.
if [[ $BOOTC_PACKAGE == "" ]]; then
echo ${BOOTC_SYSTEM}
exit
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_bootstrap/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ argument_specs:
- systemd-container
- crypto-policies-scripts
- grubby
description: "List of packages that are requred to bootstrap EDPM."
description: "List of packages that are required to bootstrap EDPM."

edpm_bootstrap_release_version_package:
type: list
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_ddp_package/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
package_filename: "ice.pkg.xz"
when: ice_pkg_xz.stat.exists

- name: Confiure ddp/ice.pkg
- name: Configure ddp/ice.pkg
ansible.builtin.file:
src: '{{ ddp_last_package_file }}'
dest: "{{ edpm_ddp_package_path }}/ddp/{{ package_filename }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_frr/templates/daemons.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fabricd_options=("-A 127.0.0.1")
# If the vtysh_enable is yes, then the unified config is read
# and applied if it exists. If no unified frr.conf exists
# then the per-daemon <daemon>.conf files are used)
# If vtysh_enable is no or non-existant, the frr.conf is ignored.
# If vtysh_enable is no or non-existent, the frr.conf is ignored.
# it is highly suggested to have this set to yes
vtysh_enable=yes

Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_kernel/tasks/download_cache.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

- name: Install addditional packages
- name: Install additional packages
ansible.builtin.dnf:
name: "{{ edpm_kernel_extra_packages }}"
download_only: true
Expand Down
4 changes: 2 additions & 2 deletions roles/edpm_kernel/tasks/kernelargs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
- name: Warn operator about workload protection
ansible.builtin.debug:
msg: |
Automated reboot for this node has been defered because it is already provisionned.
Automated reboot for this node has been deferred because it is already provisionned.
Please schedule a manual reboot after this deployment is completed.

- name: Setting workload protection fact
Expand Down Expand Up @@ -93,7 +93,7 @@
# Leapp does not recognise grub entries starting other than GRUB
# It results wrong formatting of entries in file /etc/default/grub
# In order to fix it for FFU (queens to train), EDPM_KERNEL_ARGS has been renamed
# Ensure the fresh deployment is also alinged with the same name
# Ensure the fresh deployment is also aligned with the same name
- name: Delete older name EDPM_KERNEL_ARGS entries if present
ansible.builtin.lineinfile:
dest: /etc/default/grub
Expand Down
6 changes: 3 additions & 3 deletions roles/edpm_libvirt/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ edpm_libvirt_service_name: libvirt
edpm_libvirt_download_delay: "{{ edpm_download_delay | default(60) }}"
# number of retries for download tasks
edpm_libvirt_download_retries: "{{ edpm_download_retries | default(5) }}"
# this sould map to the libvirt
# this should map to the libvirt
edpm_libvirt_services:
- virtlogd
- virtnodedevd
- virtproxyd
- virtqemud
- virtsecretd
# List of services to stop during adoption
# (container nova_virtlod is handled separetly)
# (container nova_virtlod is handled separately)
edpm_libvirt_old_tripleo_compute_sevices:
- tripleo_nova_libvirt.target
- tripleo_nova_virtlogd_wrapper.service
Expand All @@ -50,7 +50,7 @@ edpm_libvirt_packages:
- libvirt-admin {{ edpm_libvirt_range }}
- libvirt-client {{ edpm_libvirt_range }}
- libvirt-daemon {{ edpm_libvirt_range }}
# qemu pakcages
# qemu packages
- qemu-kvm
- qemu-img
# libguestfs is need for config drive and ephermeral disks
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_libvirt/molecule/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
edpm_libvirt
************

The edpm_libvirt default molecule senario uses
The edpm_libvirt default molecule scenario uses
the delegated driver to run against localhost.

As such this should only be executed on a disposable host.
Expand Down
8 changes: 4 additions & 4 deletions roles/edpm_libvirt/molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
name: "{{ item }}"
state: present
loop:
# NOTE(gibi): this is done by the boostrap role in a real deployment
# NOTE(gibi): this is done by the bootstrap role in a real deployment
- openstack-selinux
# NOTE(sean-k-mooney): this is needed to generate certs for tls testing
- python3-cryptography
Expand Down Expand Up @@ -216,8 +216,8 @@
content: "correct horse battery staple"
# FIXME(sean-k-mooney): this is a hack to work around
# the fact that the playbook uses a lookup plugin which always
# executes on the ansible contoller. This is needed to ensure
# the password is available locally when runing under vagrant.
# executes on the ansible controller. This is needed to ensure
# the password is available locally when running under vagrant.
delegate_to: localhost

- name: Gather required facts
Expand All @@ -229,7 +229,7 @@
- "system"

# FIXME(sean-k-mooney): this is a hack to work around the fact that we dont
# currently manage the hostname on the DUT via boostrap or a dedicated role
# currently manage the hostname on the DUT via bootstrap or a dedicated role
# in the molecule test. This is needed to ensure the hostname is resolvable
# when executing virsh commands. remove this when we have a proper solution
- name: Ensure hostname is resolvable in /etc/hosts
Expand Down
8 changes: 4 additions & 4 deletions roles/edpm_libvirt/molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# common directories
- "/etc/tmpfiles.d/"
- "/var/lib/openstack"
# extrenal deps
# external deps
- "/var/lib/openstack/config/ceph"
# libvirt directories
- "/var/lib/libvirt"
Expand All @@ -31,7 +31,7 @@
- name: ensure systemd services are defined and functional
ansible.builtin.include_tasks: "{{test_helper_dir}}/verify_systemd_unit.yaml"
loop:
# rhel installed services have service units defiend via rpm in
# rhel installed services have service units defined via rpm in
# /usr/lib/systemd/system so disable the check for them them in
# /etc/systemd/system
- { "name": "virtlogd.service", "osp_service": false, "enabled": "enabled" }
Expand Down Expand Up @@ -117,11 +117,11 @@
- {"path": "/run/libvirt/virtsecretd-sock", "user": "root", "group": "libvirt" }
- {"path": "/run/libvirt/virtsecretd-sock-ro", "user": "root", "group": "libvirt" }

- name: ensure container_file_t selinux lable is not set on /run/libvirt
- name: ensure container_file_t selinux label is not set on /run/libvirt
ansible.builtin.shell: "ls -lZ /run/libvirt | grep container_file_t"
register: run_libvirt
failed_when: run_libvirt.rc not in [0, 1]
- name: Assert that container_file_t selinux lable is not set on /run/libvirt
- name: Assert that container_file_t selinux label is not set on /run/libvirt
ansible.builtin.assert:
that:
- "run_libvirt.rc != 0"
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_libvirt/tasks/download_cache.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Install addditional packages
- name: Install additional packages
ansible.builtin.dnf:
name: "{{ edpm_libvirt_packages }}"
download_only: true
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_network_config/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ edpm_dns_search_domains: []
edpm_network_config_nonconfigured_cleanup: true
# Control resolv.conf management by NetworkManager
# false = disable NetworkManager resolv.conf update (default)
# true = enable NetworkManager resolv.conf updat
# true = enable NetworkManager resolv.conf update
edpm_bootstrap_network_resolvconf_update: "{{ edpm_network_config_nmstate | default(True) }}"
2 changes: 1 addition & 1 deletion roles/edpm_nftables/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
group: root
mode: "0750"

- name: Push default ruleset snipet
- name: Push default ruleset snippet
ansible.builtin.template:
dest: "{{ edpm_nftables_src }}/edpm-nftables-base.yaml"
src: base-rules.yaml.j2
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_nova/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ edpm_nova_old_tripleo_compute_sevices:
- tripleo_nova_scheduler.service
- tripleo_nova_vnc_proxy.service

# a list of addtional host mounts
# a list of additional host mounts
edpm_nova_extra_bind_mounts: []

# NVMe cleaner config
Expand Down
Loading
Loading