Move playbooks/bastion.yaml into tests folder
This really isn't needed for production deployments, it is more to make sure our testing in the gate is happy. Change-Id: Ic8e367892fbb54a57d9864e9cdb8579783a5d83f Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
36ddb0a7ce
commit
7c173d9ea5
|
@ -12,21 +12,21 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
---
|
||||
- name: Bootstrap bastion node.
|
||||
- name: Bootstrap bastion node
|
||||
hosts: bastion
|
||||
|
||||
pre_tasks:
|
||||
- name: Create SSH keys (if missing).
|
||||
- name: Create SSH keys (if missing)
|
||||
command: ssh-keygen -t rsa -f ~/.ssh/id_rsa -N ""
|
||||
args:
|
||||
creates: ~/.ssh/id_rsa
|
||||
|
||||
- name: Ensure SSH public key is authorized.
|
||||
- name: Ensure SSH public key is authorized
|
||||
authorized_key:
|
||||
user: "{{ lookup('env', 'USER') }}"
|
||||
key: "{{ lookup('file', lookup('env','HOME') + '/.ssh/id_rsa.pub') }}"
|
||||
|
||||
- name: Ensure remote SSH host keys are known.
|
||||
- name: Ensure remote SSH host keys are known
|
||||
known_hosts:
|
||||
name: "{{ hostvars[item].ansible_host }}"
|
||||
key: "{{ lookup('pipe', 'ssh-keyscan -t rsa {{ hostvars[item].ansible_host }}') }}"
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Bootstrap bastion node using ansible
|
||||
- name: Setup SSH host keys for ansible
|
||||
args:
|
||||
chdir: "{{ windmill_src_dir }}"
|
||||
shell: tox -evenv -- ansible-playbook -i inventory/testing/hosts playbooks/bastion.yaml
|
||||
shell: tox -evenv -- ansible-playbook -i inventory/testing/hosts tests/playbooks/bastion/site.yaml
|
||||
|
||||
- name: Run ansible-playbook for site.yaml
|
||||
args:
|
||||
|
|
Loading…
Reference in New Issue