-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Silvija Tovernic
committed
Sep 20, 2024
1 parent
3b86e76
commit 9d6c0cf
Showing
2 changed files
with
36 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,43 +38,38 @@ jobs: | |
template: ansible/templates/ansible_ssh_key.j2 | ||
output_file: ansible/ansible_ssh_key | ||
|
||
- run: | | ||
chmod 600 ansible/ansible_ssh_key | ||
ssh -o StrictHostKeyChecking=no -o ForwardAgent=yes -i ansible/ansible_ssh_key -J [email protected] [email protected] 'echo test' | ||
# - name: Template Ansible vars file | ||
# uses: cuchi/[email protected] | ||
# with: | ||
# template: ansible/templates/group_vars_all.yml.j2 | ||
# output_file: ansible/group_vars/all.yml | ||
|
||
# - name: Template Ansible inventory | ||
# uses: cuchi/[email protected] | ||
# with: | ||
# template: ansible/templates/inventory.ini.j2 | ||
# output_file: ansible/inventory.ini | ||
|
||
# - name: Template Ansible private key file | ||
# uses: cuchi/[email protected] | ||
# with: | ||
# template: ansible/templates/ansible_ssh_key.j2 | ||
# output_file: ansible/ansible_ssh_key | ||
|
||
# - name: Install Ansible | ||
# run: | | ||
# pip3 install ansible | ||
|
||
# - name: Print Ansible Version | ||
# run: ansible-playbook --version | ||
|
||
# - name: Configure VM with ansible | ||
# run: | | ||
# cd ansible | ||
# eval "$(ssh-agent -s)" | ||
# chmod 600 ansible_ssh_key | ||
# ssh-add ansible_ssh_key | ||
# cat inventory.ini | ||
# ansible-playbook configure-image-factory-vm.yml | ||
|
||
# # Test comment to trigger build # | ||
- name: Template Ansible vars file | ||
uses: cuchi/[email protected] | ||
with: | ||
template: ansible/templates/group_vars_all.yml.j2 | ||
output_file: ansible/group_vars/all.yml | ||
|
||
- name: Template Ansible inventory | ||
uses: cuchi/[email protected] | ||
with: | ||
template: ansible/templates/inventory.ini.j2 | ||
output_file: ansible/inventory.ini | ||
|
||
- name: Template Ansible private key file | ||
uses: cuchi/[email protected] | ||
with: | ||
template: ansible/templates/ansible_ssh_key.j2 | ||
output_file: ansible/ansible_ssh_key | ||
|
||
- name: Install Ansible | ||
run: | | ||
pip3 install ansible | ||
- name: Print Ansible Version | ||
run: ansible-playbook --version | ||
|
||
- name: Configure VM with ansible | ||
run: | | ||
cd ansible | ||
eval "$(ssh-agent -s)" | ||
chmod 600 ansible_ssh_key | ||
ssh-add ansible_ssh_key | ||
cat inventory.ini | ||
ansible-playbook configure-image-factory-vm.yml | ||
# Test comment to trigger build # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
image-factory-vm ansible_host={{ env['JUMPHOST_IP'] }} ansible_user=azureadmin ansible_ssh_common_args='-o ProxyJump=azureadmin@{{ env['RUNNER_HOST_IP'] }}' | ||
image-factory-vm ansible_host={{ env['JUMPHOST_IP'] }} ansible_user=azureadmin ansible_ssh_common_args='-o ForwardAgent=yes -o ProxyJump=azureadmin@{{ env['RUNNER_HOST_IP'] }}' |