Enabled markdownlint

Change-Id: I34b19ce71f88901d87c602f98ca6f274b61d1f82
This commit is contained in:
Sorin Sbarnea
2020-01-27 20:51:35 +00:00
parent fb91c8c0a8
commit f2467db214
19 changed files with 214 additions and 182 deletions

1
.mdlrc Normal file
View File

@@ -0,0 +1 @@
rules "~MD013", "~MD033"

View File

@@ -1,4 +1,6 @@
---
# fail fast to avoid the need to scroll (some hooks can be verbose)
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
@@ -12,6 +14,10 @@ repos:
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://github.com/markdownlint/markdownlint
rev: master
hooks:
- id: markdownlint
- repo: https://gitlab.com/pycqa/flake8
rev: '3.7.9'
hooks:

View File

@@ -1,4 +1,4 @@
tripleo-operator-ansible
------------------------
========================
This repository contains an ansible collection of TripleO roles.

2
bindep.txt Normal file
View File

@@ -0,0 +1,2 @@
# markdownlint is made in ruby
rubygems [test]

View File

@@ -27,64 +27,66 @@ Example Playbooks
Example undercloud installation
---
- hosts: undercloud
gather_facts: true
collections:
- tripleo.operator
tasks:
- name: Create dummy interface
command: ip link add prov type dummy
become: true
when: not 'prov' in ansible_facts.interfaces
```yaml
---
- hosts: undercloud
gather_facts: true
collections:
- tripleo.operator
tasks:
- name: Create dummy interface
command: ip link add prov type dummy
become: true
when: not 'prov' in ansible_facts.interfaces
- name: Set hostname
hostname:
name: 'undercloud.localdomain'
become: true
- name: Set hostname
hostname:
name: 'undercloud.localdomain'
become: true
- name: Configure tripleo repositories
import_role:
name: tripleo_repos
- name: Configure tripleo repositories
import_role:
name: tripleo_repos
- name: Install python2 tripleoclient
package:
name: python2-tripleoclient
state: present
become: true
when: ansible_distribution_major_version|int <= 7
- name: Install python2 tripleoclient
package:
name: python2-tripleoclient
state: present
become: true
when: ansible_distribution_major_version|int <= 7
- name: Install python3 tripleoclient
package:
name: python3-tripleoclient
state: present
become: true
when: ansible_distribution_major_version|int >= 8
- name: Install python3 tripleoclient
package:
name: python3-tripleoclient
state: present
become: true
when: ansible_distribution_major_version|int >= 8
# This uses https://opendev.org/openstack/ansible-config_template
- name: Generate undercloud.conf
become: True
config_template:
src: /usr/share/python-tripleoclient/undercloud.conf.sample
dest: "{{ ansible_env.HOME }}/undercloud.conf"
remote_src: true
render_template: false
config_overrides:
'DEFAULT':
undercloud_debug: true
enable_telemetry: false
local_mtu: 1400
local_interface: prov
undercloud_enable_selinux: false
'ctlplane-subnet':
masquerade: true
config_type: ini
# This uses https://opendev.org/openstack/ansible-config_template
- name: Generate undercloud.conf
become: True
config_template:
src: /usr/share/python-tripleoclient/undercloud.conf.sample
dest: "{{ ansible_env.HOME }}/undercloud.conf"
remote_src: true
render_template: false
config_overrides:
'DEFAULT':
undercloud_debug: true
enable_telemetry: false
local_mtu: 1400
local_interface: prov
undercloud_enable_selinux: false
'ctlplane-subnet':
masquerade: true
config_type: ini
- name: Install undercloud
import_role:
name: tripleo_undercloud_install
vars:
tripleo_undercloud_install_debug: true
- name: Install undercloud
import_role:
name: tripleo_undercloud_install
vars:
tripleo_undercloud_install_debug: true
```
License
-------

View File

@@ -11,7 +11,6 @@ None.
Role Variables
--------------
* `tripleo_config_generate_ansible_debug`: (Boolean) Flag used to enable the debug version of commands. Default: false
* `tripleo_config_generate_ansible_deployment_user`: (String) Deployment user to use. Default: "{{ ansible_user }}"
* `tripleo_config_generate_ansible_os_cloud`: (String) OS_CLOUD value to use when running the command. If tripleo_os_cloud is defined, it will be the default. Otherwise the default is ''. This variable takes precedence over `tripleo_config_generate_ansible_rc_file`.
@@ -33,12 +32,14 @@ Example Playbook
Example install execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: Generate default ansible config
import_role:
name: tripleo_config_generate_ansible
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: Generate default ansible config
import_role:
name: tripleo_config_generate_ansible
```
License
-------

View File

@@ -34,14 +34,16 @@ Example Playbook
Example container delete execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: Delete containers
import_role:
name: tripleo_container_image_delete
var:
tripleo_container_image_delete_image: undercloud.ctlplane.localdomain:8787/library/centos:7
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: Delete containers
import_role:
name: tripleo_container_image_delete
var:
tripleo_container_image_delete_image: undercloud.ctlplane.localdomain:8787/library/centos:7
```
License
-------

View File

@@ -20,7 +20,7 @@ Role Variables
Output Variables
----------------
* `tripleo_container_image_list_output`: (List|String) If tripleo_container_image_list_format is json, the results will automatically be parsed and a list is returned. If another format is used then this will be the response in String format.
* `tripleo_container_image_list_output`: (List|String) If tripleo_container_image_list_format is JSON, the results will automatically be parsed and a list is returned. If another format is used then this will be the response in String format.
* `tripleo_container_image_list_result`: Ansible shell execution results
Dependencies
@@ -33,16 +33,18 @@ Example Playbook
Example container list execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: List containers
import_role:
name: tripleo_container_image_list
- name: Print containers
debug:
msg: "{{ item['Image Name'] }}"
loop: "{{ tripleo_container_image_list_output }}"
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: List containers
import_role:
name: tripleo_container_image_list
- name: Print containers
debug:
msg: "{{ item['Image Name'] }}"
loop: "{{ tripleo_container_image_list_output }}"
```
License
-------

View File

@@ -36,15 +36,17 @@ Example Playbook
Example container prepare execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: Run container prepare
import_role:
name: tripleo_container_image_prepare
vars:
tripleo_container_image_prepare_files:
- /home/stack/container-image-prepare.yaml
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: Run container prepare
import_role:
name: tripleo_container_image_prepare
vars:
tripleo_container_image_prepare_files:
- /home/stack/container-image-prepare.yaml
```
License
-------

View File

@@ -31,14 +31,16 @@ Example Playbook
Example container prepare default execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: Generate default ContainerImagePrepare
import_role:
name: tripleo_container_image_prepare_default
vars:
tripleo_container_image_prepare_output_env_file: /home/stack/container-image-prepare.yaml
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: Generate default ContainerImagePrepare
import_role:
name: tripleo_container_image_prepare_default
vars:
tripleo_container_image_prepare_output_env_file: /home/stack/container-image-prepare.yaml
```
License
-------

View File

@@ -11,7 +11,6 @@ None.
Role Variables
--------------
* `tripleo_container_image_push_append_tag`: (String) Tag to append to the existing tag when pushing the container.
* `tripleo_container_image_push_become`: (Boolean) Run the command as root. This needs to be true when uploading to the local undercloud registry. Default: true
* `tripleo_container_image_push_cleanup`: (Boolean) Remove local copy of the image after uploading. Default: false
@@ -40,17 +39,19 @@ Example Playbook
Example container push execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: Push a container
import_role:
name: tripleo_container_image_push
vars:
tripleo_container_image_push_image: docker.io/library/centos:7
- name: Print output
debug:
var: tripleo_container_image_push_output
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: Push a container
import_role:
name: tripleo_container_image_push
vars:
tripleo_container_image_push_image: docker.io/library/centos:7
- name: Print output
debug:
var: tripleo_container_image_push_output
```
License
-------

View File

@@ -33,17 +33,19 @@ Example Playbook
Example container show execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: List containers
import_role:
name: tripleo_container_image_show
vars:
tripleo_container_image_show_image: docker.io/library/centos:7
- name: Print containers
debug:
var: tripleo_container_image_show_output
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: List containers
import_role:
name: tripleo_container_image_show
vars:
tripleo_container_image_show_image: docker.io/library/centos:7
- name: Print containers
debug:
var: tripleo_container_image_show_output
```
License
-------

View File

@@ -10,6 +10,7 @@ None.
Role Variables
--------------
* `tripleo_overcloud_node_introspect_node_uuids`: Baremetal Node UUIDs for the node(s) to be introspected.
* `tripleo_overcloud_node_introspect_all_manageable`: Introspect all nodes currently in 'manageable' state.
* `tripleo_overcloud_node_introspect_provide`: Provide (make available) the nodes once introspected.
@@ -40,13 +41,14 @@ Example Playbook
Example overcloud node introspect playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: Introspect node
import_role:
name: tripleo_overcloud_node_introspect
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: Introspect node
import_role:
name: tripleo_overcloud_node_introspect
```
License
-------

View File

@@ -14,7 +14,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_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_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)
Dependencies
@@ -27,16 +27,18 @@ Example Playbook
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- name: Setup tripleo_repos
include_role:
name: tripleo_repos
vars:
tripleo_repos_extra_repos:
- ceph
tripleo_repos_extra_args:
- "--rdo-mirror https://my.awesome.mirror/"
```yaml
- hosts: servers
roles:
- name: Setup tripleo_repos
include_role:
name: tripleo_repos
vars:
tripleo_repos_extra_repos:
- ceph
tripleo_repos_extra_args:
- "--rdo-mirror https://my.awesome.mirror/"
```
License
-------

View File

@@ -11,7 +11,6 @@ None.
Role Variables
--------------
* `tripleo_undercloud_backup_add_path`: (List) List of additional filesystem paths to backup. Default: []
* `tripleo_undercloud_backup_debug`: (Boolean) Flag used to enable the debug version of commands. Default: false
* `tripleo_undercloud_backup_exclude_path`: (List) List of filesystems path to skip backing up. Default: []
@@ -36,14 +35,16 @@ Example Playbook
Example backup execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: Backup undercloud
import_role:
name: tripleo_undercloud_backup
vars:
tripleo_undercloud_backup_debug: true
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: Backup undercloud
import_role:
name: tripleo_undercloud_backup
vars:
tripleo_undercloud_backup_debug: true
```
License
-------

View File

@@ -11,7 +11,6 @@ None.
Role Variables
--------------
* `tripleo_undercloud_install_debug`: (Boolean) Flag used to enable the debug version of commands. Default: false
* `tripleo_undercloud_install_dry_run`: (Boolean) Flag to add --dry-run to the install. Default: false
* `tripleo_undercloud_install_force_stack_update`: (Boolean) Flag to add --force-stack-update to the install. Default: false
@@ -39,14 +38,16 @@ Example Playbook
Example install execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: Install undercloud
import_role:
name: tripleo_undercloud_install
vars:
tripleo_undercloud_install_debug: true
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: Install undercloud
import_role:
name: tripleo_undercloud_install
vars:
tripleo_undercloud_install_debug: true
```
License
-------

View File

@@ -11,7 +11,6 @@ None.
Role Variables
--------------
* `tripleo_undercloud_minion_install_debug`: (Boolean) Flag used to enable the debug version of commands. Default: false
* `tripleo_undercloud_minion_install_home_dir`: (String) Home directory for the undercloud user. Default: "{{ ansible_env.HOME }}"
* `tripleo_undercloud_minion_install_dry_run`: (Boolean) Flag to add --dry-run to the install. Default: false
@@ -38,14 +37,16 @@ Example Playbook
Example install execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: Install undercloud minion
import_role:
name: tripleo_undercloud_minion_install
vars:
tripleo_undercloud_minion_install_debug: true
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: Install undercloud minion
import_role:
name: tripleo_undercloud_minion_install
vars:
tripleo_undercloud_minion_install_debug: true
```
License
-------

View File

@@ -11,7 +11,6 @@ None.
Role Variables
--------------
* `tripleo_undercloud_minion_upgrade_debug`: (Boolean) Flag used to enable the debug version of commands. Default: false
* `tripleo_undercloud_minion_upgrade_dry_run`: (Boolean) Flag to add --dry-run to the upgrade command. Default: false
* `tripleo_undercloud_minion_upgrade_force_stack_update`: (Boolean) Flag to add --force-stack-update to the upgrade command. Default: false
@@ -39,14 +38,16 @@ Example Playbook
Example upgrade execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: Upgrade undercloud minion
import_role:
name: tripleo_undercloud_minion_upgrade
vars:
tripleo_undercloud_minion_upgrade_debug: true
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: Upgrade undercloud minion
import_role:
name: tripleo_undercloud_minion_upgrade
vars:
tripleo_undercloud_minion_upgrade_debug: true
```
License
-------

View File

@@ -11,7 +11,6 @@ None.
Role Variables
--------------
* `tripleo_undercloud_upgrade_debug`: (Boolean) Flag used to enable the debug version of commands. Default: false
* `tripleo_undercloud_upgrade_dry_run`: (Boolean) Flag to add --dry-run to the upgrade command. Default: false
* `tripleo_undercloud_upgrade_force_stack_update`: (Boolean) Flag to add --force-stack-update to the upgrade command. Default: false
@@ -39,14 +38,16 @@ Example Playbook
Example upgrade execution playbook
- hosts: undercloud
gather_facts: true
tasks:
- name: Upgrade undercloud
import_role:
name: tripleo_undercloud_upgrade
vars:
tripleo_undercloud_upgrade_debug: true
```yaml
- hosts: undercloud
gather_facts: true
tasks:
- name: Upgrade undercloud
import_role:
name: tripleo_undercloud_upgrade
vars:
tripleo_undercloud_upgrade_debug: true
```
License
-------