From 09c629cf52153c5f572f34248914e4bee331f2a8 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 13 May 2022 10:37:29 +0200 Subject: [PATCH] Update documentation on role requirements In README file we're refferencing plugins repo for installing config_template from it. However, we're using module from it's collection. We're updating documentation along with renaming a-r-r to more common requirements.yml and adjusting rc file to drop not required overrides from there. Change-Id: I2329c2744348a8d704fe36f81e4ad43602c39541 Closes-Bug: #1961621 --- README.md | 18 ++++++++---------- ansible-role-requirements.yaml | 4 ---- manual-test.rc | 13 ++----------- requirements.yml | 5 +++++ 4 files changed, 15 insertions(+), 25 deletions(-) delete mode 100644 ansible-role-requirements.yaml create mode 100644 requirements.yml diff --git a/README.md b/README.md index a1f1b4e..297ae58 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,20 @@ This Ansible role configures systemd-networkd link, network, and netdev files. -This role requires the ``openstack-ansible-plugins`` repository to be available -on your local system. The Ansible galaxy resolver will not retrieve this role -for you. To get the plugins role in place clone the plugins repository -**before** running this role. +This role requires the ``ansible-config_template`` collection to be available +on your local system. + +To get collection you can use use the ``ansible-galaxy`` command on the +``requirements.yml`` file.. You need to install collection **before** +running this role. ``` bash -# git clone https://github.com/openstack/openstack-ansible-plugins /etc/ansible/roles/plugins +# ansible-galaxy install -r requirements.yml ``` + Release notes for the project can be found at: https://docs.openstack.org/releasenotes/ansible-role-systemd_networkd -You can also use the ``ansible-galaxy`` command on the ``ansible-role-requirements.yml`` file. - -``` bash -# ansible-galaxy install -r ansible-role-requirements.yml -``` ---- diff --git a/ansible-role-requirements.yaml b/ansible-role-requirements.yaml deleted file mode 100644 index f3e53e7..0000000 --- a/ansible-role-requirements.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- name: "plugins" - src: "https://opendev.org/openstack/openstack-ansible-plugins" - scm: git - version: "master" diff --git a/manual-test.rc b/manual-test.rc index 7016c45..287a947 100644 --- a/manual-test.rc +++ b/manual-test.rc @@ -2,21 +2,12 @@ export VIRTUAL_ENV=$(pwd) export ANSIBLE_HOST_KEY_CHECKING=False export ANSIBLE_SSH_CONTROL_PATH=/tmp/%%h-%%r -# TODO (odyssey4me) These are only here as they are non-standard folder -# names for Ansible 1.9.x. We are using the standard folder names for -# Ansible v2.x. We can remove this when we move to Ansible 2.x. -export ANSIBLE_ACTION_PLUGINS=${HOME}/.ansible/plugins/action -export ANSIBLE_CALLBACK_PLUGINS=${HOME}/.ansible/plugins/callback -export ANSIBLE_FILTER_PLUGINS=${HOME}/.ansible/plugins/filter -export ANSIBLE_LOOKUP_PLUGINS=${HOME}/.ansible/plugins/lookup - -# This is required as the default is the current path or a path specified -# in ansible.cfg -export ANSIBLE_LIBRARY=${HOME}/.ansible/plugins/library # This is required as the default is '/etc/ansible/roles' or a path # specified in ansible.cfg export ANSIBLE_ROLES_PATH=${HOME}/.ansible/roles:$(pwd)/.. +export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible:$(pwd)/.." +export ANSIBLE_COLLECTIONS_PATH="${HOME}/.ansible:$(pwd)/.." export ANSIBLE_SSH_ARGS="-o ControlMaster=no \ -o UserKnownHostsFile=/dev/null \ diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..5b9c52d --- /dev/null +++ b/requirements.yml @@ -0,0 +1,5 @@ +--- +collections: +- name: https://opendev.org/openstack/ansible-config_template + version: master + type: git