Skip to content
Merged
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
7 changes: 7 additions & 0 deletions playbooks/openshift-node/private/network_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@
hosts: oo_all_hosts
become: yes
tasks:
- name: Detecting Operating System
shell: ls /run/ostree-booted
ignore_errors: yes
failed_when: false
register: ostree_output

- name: install NetworkManager
package:
name: 'NetworkManager'
state: present
register: result
until: result is succeeded
when: ostree_output.rc != 0

- name: configure NetworkManager
lineinfile:
Expand Down
33 changes: 22 additions & 11 deletions test/ci/deprovision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,31 @@
tag-key: "kubernetes.io/cluster/{{ aws_cluster_id }}"
register: ec2

- name: Stop VMs
- name: Terminate instances
ec2:
instance_ids: "{{ item.instance_id }}"
region: "{{ aws_region }}"
state: stopped
state: absent
wait: no
with_items: "{{ ec2.instances }}"
ignore_errors: true
when: not aws_use_auto_terminator | default(true)

- name: Rename VMs
ec2_tag:
resource: "{{ item.instance_id }}"
region: "{{ aws_region }}"
tags:
Name: "{{ item.tags.Name }}-terminate"
when: "'-terminate' not in item.tags.Name"
with_items: "{{ ec2.instances }}"
- when: aws_use_auto_terminator | default(true)
block:
- name: Stop VMs
ec2:
instance_ids: "{{ item.instance_id }}"
region: "{{ aws_region }}"
state: stopped
wait: no
with_items: "{{ ec2.instances }}"
ignore_errors: true

- name: Rename VMs
ec2_tag:
resource: "{{ item.instance_id }}"
region: "{{ aws_region }}"
tags:
Name: "{{ item.tags.Name }}-terminate"
when: "'-terminate' not in item.tags.Name"
with_items: "{{ ec2.instances }}"
2 changes: 2 additions & 0 deletions test/ci/launch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,7 @@
- wait_for_connection: {}
- setup: {}


- import_playbook: ../../playbooks/openshift-node/network_manager.yml
- import_playbook: ../../playbooks/prerequisites.yml
- import_playbook: ../../playbooks/deploy_cluster.yml
4 changes: 4 additions & 0 deletions test/ci/vars.yml.sample
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
vm_prefix: "ci_test"
#aws_use_auto_terminator is set to True by default, as rh-dev account doesn't have permission
# to terminate instances. These should be stopped and renamed to include 'terminate' instead
#aws_use_auto_terminator: false

type: aws
aws_user: "ec2-user"
python: "/usr/bin/python"

aws_key: "libra"
aws_region: "us-east-1"
aws_cluster_id: "ci"
Expand Down