Rename roles to use underscore

It appears that '-' is not valid in role names in collections per
https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#roles-directory

Change-Id: Id472a75ed71170208acc7cfbc79f7ad18945ea67
This commit is contained in:
Alex Schultz 2020-01-20 08:15:57 -07:00
parent bf90885e13
commit b349c5312b
95 changed files with 156 additions and 131 deletions

View File

@ -45,7 +45,7 @@ Example undercloud installation
- name: Configure tripleo repositories
import_role:
name: tripleo-repos
name: tripleo_repos
- name: Install python2 tripleoclient
package:
@ -82,7 +82,7 @@ Example undercloud installation
- name: Install undercloud
import_role:
name: tripleo-undercloud-install
name: tripleo_undercloud_install
vars:
tripleo_undercloud_install_debug: true

View File

@ -0,0 +1 @@
tripleo_config_generate_ansible

View File

@ -0,0 +1 @@
tripleo_container_image_delete

View File

@ -0,0 +1 @@
tripleo_container_image_list

View File

@ -0,0 +1 @@
tripleo_container_image_prepare_default

View File

@ -0,0 +1 @@
tripleo_container_image_push

View File

@ -0,0 +1 @@
tripleo_container_image_show

1
roles/tripleo-repos Symbolic link
View File

@ -0,0 +1 @@
tripleo_repos

View File

@ -1,2 +0,0 @@
---
# handlers file for tripleo-repos

View File

@ -1,2 +0,0 @@
---
# vars file for tripleo-repos

View File

@ -0,0 +1 @@
tripleo_undercloud_backup

View File

@ -0,0 +1 @@
tripleo_undercloud_install

View File

@ -0,0 +1 @@
tripleo_undercloud_minion_install

View File

@ -1,5 +0,0 @@
---
- hosts: localhost
remote_user: root
roles:
- tripleo-undercloud-minion-install

View File

@ -0,0 +1 @@
tripleo_undercloud_minion_upgrade

View File

@ -1,42 +0,0 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo-undercloud-minion-install
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
platforms:
- name: CentOS
versions:
- 7
- 8
galaxy_tags:
- tripleo
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
dependencies: []

View File

@ -1,5 +0,0 @@
---
- hosts: localhost
remote_user: root
roles:
- tripleo-undercloud-minion-upgrade

View File

@ -0,0 +1 @@
tripleo_undercloud_upgrade

View File

@ -1,4 +1,4 @@
tripleo-config-generate-ansible
tripleo_config_generate_ansible
===============================
A role to generate the default ansible.cfg for a deployment.
@ -38,7 +38,7 @@ Example install execution playbook
tasks:
- name: Generate default ansible config
import_role:
name: tripleo-config-generate-ansible
name: tripleo_config_generate_ansible
License
-------

View File

@ -1,5 +1,5 @@
---
# defaults file for tripleo-config-generate-ansible
# defaults file for tripleo_config_generate_ansible
tripleo_config_generate_ansible_debug: false
tripleo_config_generate_ansible_deployment_user: "{{ ansible_user }}"
tripleo_config_generate_ansible_os_cloud: "{{ tripleo_os_cloud | default('') }}"

View File

@ -17,7 +17,7 @@
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo-config-generate-ansible
description: TripleO Operator Role -- tripleo_config_generate_ansible
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8

View File

@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- tripleo-config-generate-ansible
- tripleo_config_generate_ansible

View File

@ -1,4 +1,4 @@
tripleo-container-image-delete
tripleo_container_image_delete
==============================
A role to perform the container image delete against a registry.
@ -39,7 +39,7 @@ Example container delete execution playbook
tasks:
- name: Delete containers
import_role:
name: tripleo-container-image-delete
name: tripleo_container_image_delete
var:
tripleo_container_image_delete_image: undercloud.ctlplane.localdomain:8787/library/centos:7

View File

@ -1,5 +1,5 @@
---
# defaults file for tripleo-container-image-delete
# defaults file for tripleo_container_image_delete
tripleo_container_image_delete_become: true
tripleo_container_image_delete_debug: false
tripleo_container_image_delete_password:

View File

@ -17,7 +17,7 @@
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo-container-image-delete
description: TripleO Operator Role -- tripleo_container_image_delete
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8

View File

@ -1,5 +1,5 @@
---
# tasks file for tripleo-container-image-delete
# tasks file for tripleo_container_image_delete
- name: Setup container image delete facts
set_fact:
_delete_cmd: >-

View File

@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- tripleo-container-image-delete
- tripleo_container_image_delete

View File

@ -1,4 +1,4 @@
tripleo-container-image-list
tripleo_container_image_list
============================
A role to perform the container image list against a registry.
@ -38,7 +38,7 @@ Example container list execution playbook
tasks:
- name: List containers
import_role:
name: tripleo-container-image-list
name: tripleo_container_image_list
- name: Print containers
debug:
msg: "{{ item['Image Name'] }}"

View File

@ -1,5 +1,5 @@
---
# defaults file for tripleo-container-image-list
# defaults file for tripleo_container_image_list
tripleo_container_image_list_debug: false
tripleo_container_image_list_format: json
tripleo_container_image_list_password:

View File

@ -17,7 +17,7 @@
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo-container-image-list
description: TripleO Operator Role -- tripleo_container_image_list
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8

View File

@ -1,5 +1,5 @@
---
# tasks file for tripleo-container-image-list
# tasks file for tripleo_container_image_list
- name: Setup container image list facts
set_fact:
_list_cmd: >-

View File

@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- tripleo-container-image-list
- tripleo_container_image_list

View File

@ -1,4 +1,4 @@
tripleo-container-image-prepare-default
tripleo_container_image_prepare_default
============================
A role to perform the container image push against a registry.
@ -36,7 +36,7 @@ Example container prepare default execution playbook
tasks:
- name: Generate default ContainerImagePrepare
import_role:
name: tripleo-container-image-prepare-default
name: tripleo_container_image_prepare_default
vars:
tripleo_container_image_prepare_output_env_file: /home/stack/container-image-prepare.yaml

View File

@ -17,7 +17,7 @@
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo-container-image-prepare-default
description: TripleO Operator Role -- tripleo_container_image_prepare_default
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8

View File

@ -1,5 +1,5 @@
---
# tasks file for tripleo-container-image-prepare-default
# tasks file for tripleo_container_image_prepare_default
- name: Setup container image prepare default facts
set_fact:
_prepare_cmd: >-

View File

@ -1,6 +1,6 @@
---
- hosts: localhost
roles:
- tripleo-container-image-prepare-default
- tripleo_container_image_prepare_default
vars:
tripleo_container_image_prepare_default_output_env_file: "{{ ansible_env.HOME }}/container-image-prepare.yaml }}"

View File

@ -1,4 +1,4 @@
tripleo-container-image-push
tripleo_container_image_push
============================
A role to perform the container image push against a registry.
@ -45,7 +45,7 @@ Example container push execution playbook
tasks:
- name: Push a container
import_role:
name: tripleo-container-image-push
name: tripleo_container_image_push
vars:
tripleo_container_image_push_image: docker.io/library/centos:7
- name: Print output

View File

@ -1,5 +1,5 @@
---
# defaults file for tripleo-container-image-push
# defaults file for tripleo_container_image_push
tripleo_container_image_push_append_tag:
tripleo_container_image_push_become: true
tripleo_container_image_push_cleanup: false

View File

@ -17,7 +17,7 @@
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo-container-image-push
description: TripleO Operator Role -- tripleo_container_image_push
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8

View File

@ -1,5 +1,5 @@
---
# tasks file for tripleo-container-image-push
# tasks file for tripleo_container_image_push
- name: Setup container image push facts
set_fact:
_push_cmd: >-

View File

@ -2,6 +2,6 @@
- hosts: localhost
remote_user: root
roles:
- tripleo-container-image-push
- tripleo_container_image_push
vars:
tripleo_container_image_push_image: docker.io/library/centos:7

View File

@ -1,4 +1,4 @@
tripleo-container-image-show
tripleo_container_image_show
============================
A role to perform the container image show against a registry.
@ -38,7 +38,7 @@ Example container show execution playbook
tasks:
- name: List containers
import_role:
name: tripleo-container-image-show
name: tripleo_container_image_show
vars:
tripleo_container_image_show_image: docker.io/library/centos:7
- name: Print containers

View File

@ -1,5 +1,5 @@
---
# defaults file for tripleo-container-image-show
# defaults file for tripleo_container_image_show
tripleo_container_image_show_debug: false
tripleo_container_image_show_format: json
tripleo_container_image_show_password:

View File

@ -17,7 +17,7 @@
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo-container-image-show
description: TripleO Operator Role -- tripleo_container_image_show
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8

View File

@ -1,5 +1,5 @@
---
# tasks file for tripleo-container-image-show
# tasks file for tripleo_container_image_show
- name: Setup container image show facts
set_fact:
_show_cmd: >-

View File

@ -2,6 +2,6 @@
- hosts: localhost
remote_user: root
roles:
- tripleo-container-image-show
- tripleo_container_image_show
vars:
tripleo_container_image_show_image: docker.io/library/centos:7

View File

@ -1,7 +1,7 @@
tripleo-repos
tripleo_repos
=============
Role to install tripleo-repos and use it to manage tripleo yum repos.
Role to install tripleo_repos and use it to manage tripleo yum repos.
Requirements
------------
@ -12,7 +12,7 @@ Role Variables
--------------
* `tripleo_repos_branch`: (String) Repo branch to configure (master|train|stein|etc)
* `tripleo_repos_extra_args`: (List) List of extra arguments to pass to tripleo-repos
* `tripleo_repos_extra_args`: (List) List of extra arguments to pass to tripleo_repos
* `tripleo_repos_extra_repos`: (List) List of extra repos to configure (e.g. ceph)
* `tripleo_repos_repo_base`: (String) Url base to RDO (default: https://trunk.rdoproject.org)
* `tripleo_repos_version`: (String) Version to configure (current-tripleo-dev|current-tripleo|current)
@ -29,9 +29,9 @@ Including an example of how to use your role (for instance, with variables passe
- hosts: servers
roles:
- name: Setup tripleo-repos
- name: Setup tripleo_repos
include_role:
name: tripleo-repos
name: tripleo_repos
vars:
tripleo_repos_extra_repos:
- ceph

View File

@ -1,5 +1,5 @@
---
# defaults file for tripleo-repos
# defaults file for tripleo_repos
tripleo_repos_branch: master
tripleo_repos_extra_args: []
tripleo_repos_extra_repos: []

View File

@ -0,0 +1,2 @@
---
# handlers file for tripleo_repos

View File

@ -17,7 +17,7 @@
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo-repos
description: TripleO Operator Role -- tripleo_repos
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8

View File

@ -7,7 +7,7 @@
set_fact:
_tripleo_repos_repo_url: "{{ tripleo_repos_repo_base }}/{{ _tripleo_repos_distro }}-{{ tripleo_repos_branch }}/current/"
- name: Find available tripleo-repos rpm
- name: Find available tripleo_repos rpm
block:
- name: Grab repo package list
uri:
@ -18,13 +18,13 @@
register: _tripleo_repos_repo_data
- name: Find rpm name
set_fact:
_tripleo_repos_rpm: "{{ _tripleo_repos_repo_data.content | regex_search('python[0-9]-tripleo-repos-[a-z0-9-.]+\\.rpm') }}"
_tripleo_repos_rpm: "{{ _tripleo_repos_repo_data.content | regex_search('python[0-9]-tripleo_repos-[a-z0-9-.]+\\.rpm') }}"
- name: Fail if rpm is missing
fail:
msg: Unable to find tripleo-repos rpm
msg: Unable to find tripleo_repos rpm
when: _tripleo_repos_rpm|length == 0
- name: Install tripleo-repos
- name: Install tripleo_repos
yum:
name: "{{ _tripleo_repos_repo_url }}{{ _tripleo_repos_rpm }}"
state: present

View File

@ -1,5 +1,5 @@
---
# tasks file for tripleo-repos
# tasks file for tripleo_repos
# TODO(mwhahaha): uncomment this once we have a version of ansible with
# https://github.com/ansible/ansible/pull/65776
@ -11,14 +11,14 @@
- name: Gather the rpm package facts
package_facts:
- name: Install tripleo-repos
- name: Install tripleo_repos
include_tasks: install.yml
when: (ansible_facts.distribution_major_version|int <= 7 and not 'python2-tripleo-repos' in ansible_facts.packages) or
(ansible_facts.distribution_major_version|int <= 8 and not 'python3-tripleo-repos' in ansible_facts.packages)
when: (ansible_facts.distribution_major_version|int <= 7 and not 'python2-tripleo_repos' in ansible_facts.packages) or
(ansible_facts.distribution_major_version|int <= 8 and not 'python3-tripleo_repos' in ansible_facts.packages)
- name: Run tripleo-repos
- name: Run tripleo_repos
command: >-
tripleo-repos
tripleo_repos
-b {{ tripleo_repos_branch }}
{{ tripleo_repos_extra_args | join(' ') }}
{{ tripleo_repos_version }}

View File

@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- tripleo-repos
- tripleo_repos

View File

@ -0,0 +1,2 @@
---
# vars file for tripleo_repos

View File

@ -1,4 +1,4 @@
tripleo-undercloud-backup
tripleo_undercloud_backup
=========================
A role to run backup of a TripleO undercloud.
@ -41,7 +41,7 @@ Example backup execution playbook
tasks:
- name: Backup undercloud
import_role:
name: tripleo-undercloud-backup
name: tripleo_undercloud_backup
vars:
tripleo_undercloud_backup_debug: true

View File

@ -1,5 +1,5 @@
---
# defaults file for tripleo-undercloud-backup
# defaults file for tripleo_undercloud_backup
tripleo_undercloud_backup_add_path: []
tripleo_undercloud_backup_debug: false
tripleo_undercloud_backup_exclude_path: []

View File

@ -17,7 +17,7 @@
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo-undercloud-backup
description: TripleO Operator Role -- tripleo_undercloud_backup
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8

View File

@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- tripleo-undercloud-backup
- tripleo_undercloud_backup

View File

@ -1,4 +1,4 @@
tripleo-undercloud-install
tripleo_undercloud_install
==========================
A role to run the install of a TripleO undercloud.
@ -44,7 +44,7 @@ Example install execution playbook
tasks:
- name: Install undercloud
import_role:
name: tripleo-undercloud-install
name: tripleo_undercloud_install
vars:
tripleo_undercloud_install_debug: true

View File

@ -1,5 +1,5 @@
---
# defaults file for tripleo-undercloud-install
# defaults file for tripleo_undercloud_install
tripleo_undercloud_install_debug: false
tripleo_undercloud_install_dry_run: false
tripleo_undercloud_install_force_stack_update: false

View File

@ -17,7 +17,7 @@
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo-undercloud-install
description: TripleO Operator Role -- tripleo_undercloud_install
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8

View File

@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- tripleo-undercloud-install
- tripleo_undercloud_install

View File

@ -1,4 +1,4 @@
tripleo-undercloud-minion-install
tripleo_undercloud_minion_install
==========================
A role to run the install a TripleO undercloud minion.
@ -43,7 +43,7 @@ Example install execution playbook
tasks:
- name: Install undercloud minion
import_role:
name: tripleo-undercloud-minion-install
name: tripleo_undercloud_minion_install
vars:
tripleo_undercloud_minion_install_debug: true

View File

@ -1,5 +1,5 @@
---
# defaults file for tripleo-undercloud-minion-install
# defaults file for tripleo_undercloud_minion_install
tripleo_undercloud_minion_install_debug: false
tripleo_undercloud_minion_install_home_dir: "{{ ansible_env.HOME }}"
tripleo_undercloud_minion_install_dry_run: false

View File

@ -0,0 +1,42 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo_undercloud_minion_install
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
platforms:
- name: CentOS
versions:
- 7
- 8
galaxy_tags:
- tripleo
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
dependencies: []

View File

@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- tripleo_undercloud_minion_install

View File

@ -1,4 +1,4 @@
tripleo-undercloud-minion-upgrade
tripleo_undercloud_minion_upgrade
=================================
A role to run the upgrade of a TripleO undercloud minion.
@ -44,7 +44,7 @@ Example upgrade execution playbook
tasks:
- name: Upgrade undercloud minion
import_role:
name: tripleo-undercloud-minion-upgrade
name: tripleo_undercloud_minion_upgrade
vars:
tripleo_undercloud_minion_upgrade_debug: true

View File

@ -1,5 +1,5 @@
---
# defaults file for tripleo-undercloud-minion-upgrade
# defaults file for tripleo_undercloud_minion_upgrade
tripleo_undercloud_minion_upgrade_debug: false
tripleo_undercloud_minion_upgrade_dry_run: false
tripleo_undercloud_minion_upgrade_force_stack_update: false

View File

@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- tripleo_undercloud_minion_upgrade

View File

@ -1,4 +1,4 @@
tripleo-undercloud-upgrade
tripleo_undercloud_upgrade
==========================
A role to run the upgrade of a TripleO undercloud.
@ -44,7 +44,7 @@ Example upgrade execution playbook
tasks:
- name: Upgrade undercloud
import_role:
name: tripleo-undercloud-upgrade
name: tripleo_undercloud_upgrade
vars:
tripleo_undercloud_upgrade_debug: true

View File

@ -17,7 +17,7 @@
galaxy_info:
author: OpenStack
description: TripleO Operator Role -- tripleo-undercloud-upgrade
description: TripleO Operator Role -- tripleo_undercloud_upgrade
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.8

View File

@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- tripleo-undercloud-upgrade
- tripleo_undercloud_upgrade

View File

@ -25,6 +25,19 @@ data_files =
share/ansible/collections/ansible_collections/tripleo/operator/ = README.md
share/ansible/collections/ansible_collections/tripleo/operator/roles/ = roles/*
share/ansible/collections/ansible_collections/tripleo/operator/plugins/ = plugins/*
# TODO(mwhahaha): remove once rename is complete
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-config-generate-ansible/ = roles/tripleo-config-generate-ansible/*
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-container-image-delete/ = roles/tripleo-container-image-delete/*
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-container-image-list/ = roles/tripleo-container-image-list/*
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-container-image-prepare-default/ = roles/tripleo-container-image-prepare-default/*
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-container-image-push/ = roles/tripleo-container-image-push/*
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-container-image-show/ = roles/tripleo-container-image-show/*
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-repos/ = roles/tripleo-repos/*
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-undercloud-backup/ = roles/tripleo-undercloud-backup/*
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-undercloud-install/ = roles/tripleo-undercloud-install/*
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-undercloud-minion-install/ = roles/tripleo-undercloud-minion-install/*
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-undercloud-minion-upgrade/ = roles/tripleo-undercloud-minion-upgrade/*
share/ansible/collections/ansible_collections/tripleo/operator/roles/tripleo-undercloud-upgrade/ = roles/tripleo-undercloud-upgrade/*
[wheel]
universal = 1

View File

@ -11,7 +11,7 @@
- openstack-tox-py37
- openstack-tox-linters
files: &containers_multinode_files
- ^roles/tripleo-undercloud-install/.*$
- ^roles/tripleo_undercloud_install/.*$
gate:
jobs:
- openstack-tox-linters