use scoped var, pass it down the line
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
67ca6b7a03
commit
6d71a5bd31
@ -8,9 +8,10 @@
|
|||||||
new_hetzner_server_image: debian-10
|
new_hetzner_server_image: debian-10
|
||||||
new_hetzner_delete_protection: false
|
new_hetzner_delete_protection: false
|
||||||
new_hetzner_rebuild_protection: false
|
new_hetzner_rebuild_protection: false
|
||||||
|
new_hetzner_user_accounts: files/members.yml
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Include resource variables
|
- name: Include resource variables
|
||||||
include_vars: files/members.yml
|
include_vars: "{{ new_hetzner_user_accounts }}"
|
||||||
tasks:
|
tasks:
|
||||||
- name: Run the role under test
|
- name: Run the role under test
|
||||||
block:
|
block:
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
that: "{{ item }} is defined"
|
that: "{{ item }} is defined"
|
||||||
fail_msg: "You must define the '{{ item }}' variable"
|
fail_msg: "You must define the '{{ item }}' variable"
|
||||||
with_items:
|
with_items:
|
||||||
- members
|
- new_hetzner_user_accounts
|
||||||
- new_hetzner_server_image
|
- new_hetzner_server_image
|
||||||
- new_hetzner_server_name
|
- new_hetzner_server_name
|
||||||
- new_hetzner_server_type
|
- new_hetzner_server_type
|
||||||
|
|
||||||
- name: Include resource variables
|
- name: Include resource variables
|
||||||
include_vars: "{{ members }}"
|
include_vars: "{{ new_hetzner_user_accounts }}"
|
||||||
tags:
|
tags:
|
||||||
- molecule-notest
|
- molecule-notest
|
||||||
|
|
||||||
@ -66,7 +66,7 @@
|
|||||||
|
|
||||||
- name: Run the add-users role on the new instance
|
- name: Run the add-users role on the new instance
|
||||||
vars:
|
vars:
|
||||||
members: "{{ members }}"
|
add_users_user_accounts: "{{ new_hetzner_user_accounts }}"
|
||||||
delegate_to: root-new-instance
|
delegate_to: root-new-instance
|
||||||
import_role:
|
import_role:
|
||||||
name: autonomic.add-users
|
name: autonomic.add-users
|
||||||
@ -74,6 +74,8 @@
|
|||||||
- molecule-notest
|
- molecule-notest
|
||||||
|
|
||||||
- name: Run the sshd role on the new instance
|
- name: Run the sshd role on the new instance
|
||||||
|
vars:
|
||||||
|
sshd_user_accounts: "{{ new_hetzner_user_accounts }}"
|
||||||
delegate_to: root-new-instance
|
delegate_to: root-new-instance
|
||||||
import_role:
|
import_role:
|
||||||
name: autonomic.sshd
|
name: autonomic.sshd
|
||||||
|
Reference in New Issue
Block a user