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
# cat roles/deploy/tasks/main.yml | |
- name: Copy Script config | |
win_copy: | |
src: script.ps1 | |
dest: C:\Windows\Temp\script.ps1 | |
- name: Execute script | |
win_shell: C:\Windows\Temp\script.ps1 | |
- name: ensure IIS and ASP.NET are installed |
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
# cat roles/deploy/files/script.ps1 | |
# Install Chocolatey | |
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
# Globally Auto confirm every action | |
choco feature enable -n allowGalobalConfirmation | |
# Install JDK 8 and git | |
choco install jdk8 | |
choco install git |
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
# cat roles/build-ami/tasks/main.yml | |
- name: Create AMI | |
ec2_ami: | |
region: "{{ target_aws_region }}" | |
instance_id: "{{ item.id }}" | |
name: "windows-personalizado" | |
wait: yes | |
state: present | |
with_items: "{{ ec2_result.tagged_instances }}" | |
register: ami |
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
# cat roles/terminate/tasks/main.yml | |
- name: ensure instances are not running | |
ec2: | |
region: "{{ target_aws_region }}" | |
image: "{{ win_ami_id }}" | |
instance_type: "{{ instance_type }}" | |
group_id: "{{ sg_out.group_id }}" | |
key_name: "{{ keypair }}" | |
wait: yes | |
wait_timeout: 500 |
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
# cat deploy.yml | |
- hosts: localhost | |
gather_facts: no | |
roles: | |
- role: launch | |
name: win | |
- hosts: win | |
roles: | |
- deploy |
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
{"version":1,"resource":"file:///home/sidnei/teste.go","entries":[{"id":"GNpS.go","source":"textFileCreate.source","timestamp":1653672755513},{"id":"JKJk.go","timestamp":1653672802221},{"id":"D6dO.go","timestamp":1653672833609},{"id":"cfnA.go","timestamp":1653672863453}]} |
OlderNewer