Skip to content

Commit

Permalink
list containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Polina-Gubina committed Dec 5, 2023
1 parent 3e83b33 commit 48aa9f9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
11 changes: 11 additions & 0 deletions playbooks/files/list_containers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python3

import openstack

from otcextensions import sdk

openstack.enable_logging(True)
conn = openstack.connect()
sdk.register_otc_extensions(conn)

list(conn.obs.containers())
9 changes: 9 additions & 0 deletions playbooks/scenario32_obs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Scenario 32 - list of containers obs
hosts: localhost
ignore_errors: yes
tasks:
- name: List of containers
script: "list_containers.py"
args:
executable: python3
4 changes: 2 additions & 2 deletions roles/vpc/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# tasks file for otc-vpc-role
# Create
- block:
- include: "{{ net_task }}.yaml"
- ansible.builtin.include_tasks: "{{ net_task }}.yaml"
loop_control:
loop_var: net_task
with_items: "{{ task_manager }}"
Expand All @@ -18,7 +18,7 @@

# Remove
- block:
- include: "{{ net_task }}.yaml"
- ansible.builtin.include_tasks: "{{ net_task }}.yaml"
loop_control:
loop_var: net_task
with_items: "{{ task_manager | reverse | list }}"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ install_command = pip install {opts} {packages}

[testenv:linters]
deps =
ansible
ansible==5.8.0
ansible-lint
yamllint
flake8
Expand Down

0 comments on commit 48aa9f9

Please sign in to comment.