Skip to content

Commit 2576d25

Browse files
committed
fix locking instances play
1 parent 0a4988d commit 2576d25

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

ansible/adhoc/lock_unlock_instances.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22

33
- hosts: cluster
4-
gather_facts: no
5-
become: no
4+
gather_facts: false
5+
become: false
66
tasks:
77
- name: Lock/Unlock instances
88
openstack.cloud.server_action:

ansible/adhoc/rebuild-via-slurm.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88

99
# See docs/slurm-controlled-rebuild.md.
1010

11-
- name: Unlock compute instances for rebuild
12-
vars:
13-
appliances_server_action: unlock
14-
ansible.builtin.command: ansible-playbook --limit compute adhoc/lock_unlock_instances.yml
11+
- hosts: localhost
12+
gather_facts: false
13+
tasks:
14+
- name: Unlock compute nodes to ready rebuild
15+
ansible.builtin.command:
16+
cmd: ansible-playbook --limit compute adhoc/lock_unlock_instances.yml -e "appliances_server_action=unlock"
1517

1618
- hosts: login
1719
run_once: true

ansible/site.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
- ansible.builtin.import_playbook: safe-env.yml
44

5-
- name: Lock cluster instances
6-
ansible.builtin.command: ansible-playbook adhoc/lock_unlock_instances.yml
5+
- hosts: localhost
6+
gather_facts: false
7+
tasks:
8+
- name: Lock all cluster instances
9+
ansible.builtin.command:
10+
cmd: ansible-playbook adhoc/lock_unlock_instances.yml
711

812
- name: Run pre.yml hook
913
vars:

0 commit comments

Comments
 (0)