· 5 years ago · Jan 31, 2020, 05:10 PM
1cat roles/ec2_create/tasks/main.yml
2---
3- name: Launch Instance(s)
4 ec2:
5 aws_access_key: "{{ access_key }}"
6 aws_secret_key: "{{ secret_key }}"
7 region: "{{ region }}"
8 keypair: "{{ keypair }}"
9 vpc_subnet_id: "{{ item }}"
10 assign_public_ip: "{{ assign_public_ip }}"
11 group: "{{ security_group }}"
12 instance_type: "{{ instance_type }}"
13 image: "{{ hostvars['localhost']['ami_result']['results'][0].ami_id }}"
14 count: "{{ count }}"
15 wait: true
16 instance_tags: "{{ instance_tags }}"
17 ebs_optimized: "{{ ebs_optimized }}"
18 volumes: "{{ ec2_volumes }}"
19 instance_profile_name: "{{ iam }}"
20
21 with_items: "{{ vpc_subnet_id.split(',') }}"
22 register: ec2
23
24- name: Instance Ids
25 debug: msg={{ item.instances[0].id }}
26 with_items: "{{ec2.results}}"
27
28- name: Add hosts group temporary inventory group with pem path
29 add_host:
30 name: "{{ item.instances[0].private_ip }}"
31 groups: "{{ group_name }}"
32 ansible_ssh_private_key_file: "{{ pem_path }}/{{ keypair }}.pem"
33 ansible_ssh_user: "{{ ansible_ssh_user }}"
34 with_items: "{{ec2.results}}"
35 when: pem_path != ""
36
37- name: Add hosts group temporary inventory group without pem path
38 add_host:
39 name: "{{ item.instances[0].private_ip }}"
40 groups: "{{ group_name }}"
41 ansible_ssh_user: "{{ ansible_ssh_user }}"
42 with_items: "{{ec2.results}}"
43 when: pem_path == ""
44
45- name: Update Instance Name Tag(s)
46 ec2_tag:
47 aws_access_key: "{{ access_key }}"
48 aws_secret_key: "{{ secret_key }}"
49 region: "{{ region }}"
50 resource: "{{ item.instances[0].id }}"
51 tags:
52 Name: "{{ name }} - {{ item.instances[0].private_ip }}"
53 with_items: "{{ec2.results}}"
54
55- name: Scheduler Instance Name Tag(s) in dev
56 ec2_tag:
57 aws_access_key: "{{ access_key }}"
58 aws_secret_key: "{{ secret_key }}"
59 region: "{{ region }}"
60 resource: "{{ item.instances[0].id }}"
61 tags:
62 scheduler:ec2-startstop:sat: "none;0030;utc;sat"
63 when: "('dev' in bld_env) and ('rm-' in name) and ('site-gw' not in name) and ('sep' not in name) and ('alarm' not in name)"
64 with_items: "{{ec2.results}}"
65
66- name: Scheduler Instance Name Tag(s) in Qa
67 ec2_tag:
68 aws_access_key: "{{ access_key }}"
69 aws_secret_key: "{{ secret_key }}"
70 region: "{{ region }}"
71 resource: "{{ item.instances[0].id }}"
72 tags:
73 ec2-start-stop-weekly: "fri:0530;sun:0500-{{bld_env}}"
74 when: "('qa' in bld_env) and ('es-analytics' not in name) and ('es-parse' not in name) and ('es-logstash' not in name) and ('es-core' not in name) and ('Shared-Services' not in name) and ('kafka' not in name) and ('core-spring-boot' not in name) and ('activemq' not in name) and ('keycloak' not in name) and ('ldap' not in name) and ('cloud-ca' not in name)"
75 with_items: "{{ec2.results}}"
76
77- name: Ec2 Results
78 debug: msg={{ ec2.results }}
79
80- name: Retrieve all volumes for instance
81 ec2_vol:
82 instance: "{{ item.instances[0].id }}"
83 region: "{{ region }}"
84 state: list
85 with_items: "{{ ec2.results }}"
86 register: ec2_vol
87
88- name: All volumes
89 debug: msg={{ ec2_vol }}
90
91#- debug: msg= "{{ item.instances[0].block_device_mapping }}"
92# with_items: "{{ec2_vol}}"
93
94#- name: Tag EBS Volumes
95# ec2_tag:
96# region: "{{ region }}"
97# resource: "{{ item }}"
98# state: present
99# tags:
100# Name: "{{ app_name }}"
101# bld_env: "{{ bld_env }}"
102# product-line: "{{ product }}"
103# with_items:
104# - "{{ ec2_vol.results[0].volumes | map(attribute='id') | list }}"
105# register: ebs_volume
106- name: Ensure all volumes are tagged
107 ec2_tag:
108 region: "{{ region }}"
109 resource: '{{ item.instances.volume_id }}'
110 state: present
111 tags:
112 Name: ThisIsAtest
113 with_items: "{{ ec2.results }}"
114
115#- name: Ensure all volumes are tagged
116# ec2_tag:
117# region: "{{ region }}"
118# resource: '{{ item }}'
119# state: present
120# tags:
121# Name: ThisIsAtest
122# with_items: "{{ ec2.results[0].instances | map(attribute='volume_id') | list }}"
123
124#- name: All volumes
125# debug: msg={{ ebs_volume }}
126
127- name: Write Instance ID out to a file
128 template:
129 src=id.ini.j2
130 dest="./id.ini"
131
132- name: Wait for SSH
133 wait_for:
134 host: "{{ item.instances[0].private_ip }}"
135 port: 22
136 delay: 30
137 timeout: 420
138 state: started
139 with_items: "{{ec2.results}}"
140 register: result
141
142- debug: var=result
143 when: result|failed
144
145
146++++++++++++++++++++++++
147Started by user Shaikh, Sameeruddin
148[EnvInject] - Loading node environment variables.
149Building remotely on Jenkins-ECS-tc1vn (ansible) in workspace /home/jenkins/workspace/Core_Report
150[WS-CLEANUP] Deleting project workspace...
151Cloning the remote Git repository
152Cloning repository ssh://git@bitbucket.qa.aws.gilbarco.com:7999/gci/ansible.git
153 > git init /home/jenkins/workspace/Core_Report # timeout=10
154Fetching upstream changes from ssh://git@bitbucket.qa.aws.gilbarco.com:7999/gci/ansible.git
155 > git --version # timeout=10
156using GIT_SSH to set credentials Match id_rsa from jenkins home directory
157 > git fetch --tags --progress ssh://git@bitbucket.qa.aws.gilbarco.com:7999/gci/ansible.git +refs/heads/*:refs/remotes/origin/*
158 > git config remote.origin.url ssh://git@bitbucket.qa.aws.gilbarco.com:7999/gci/ansible.git # timeout=10
159 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
160 > git config remote.origin.url ssh://git@bitbucket.qa.aws.gilbarco.com:7999/gci/ansible.git # timeout=10
161Fetching upstream changes from ssh://git@bitbucket.qa.aws.gilbarco.com:7999/gci/ansible.git
162using GIT_SSH to set credentials Match id_rsa from jenkins home directory
163 > git fetch --tags --progress ssh://git@bitbucket.qa.aws.gilbarco.com:7999/gci/ansible.git +refs/heads/*:refs/remotes/origin/*
164 > git rev-parse origin/DOK-1385-new^{commit} # timeout=10
165Checking out Revision b0d041bb2bf029bf56f14334dd08915e1c74172a (origin/DOK-1385-new)
166 > git config core.sparsecheckout # timeout=10
167 > git checkout -f b0d041bb2bf029bf56f14334dd08915e1c74172a
168Commit message: "added new tags 2"
169 > git rev-list --no-walk 02f0e28a98d4ebe67bb52d5f9f561a3cdd29f736 # timeout=10
170Run condition [Regular expression match] enabling prebuild for step [Trigger/call builds on other projects]
171Set build name.
172New build name is 'qa-#116'
173[Core_Report] $ /bin/bash /tmp/jenkins5137307015003749883.sh
174[EnvInject] - Injecting environment variables from a build step.
175[EnvInject] - Injecting as environment variables the properties file path '/home/jenkins/workspace/Core_Report/qa.conf'
176[EnvInject] - Variables injected successfully.
177[Core_Report] $ /home/jenkins/.local/bin/ansible-playbook /home/jenkins/workspace/Core_Report/get_hosts.yml -i /tmp/inventory3847112026691154975.ini -f 5 -e bld_env=qa -e region=us-east-1 -e app_name=core-report-qa -e product=Common
178 [WARNING]: provided hosts list is empty, only localhost is available. Note
179that the implicit localhost does not match 'all'
180
181[DEPRECATION WARNING]: ec2_remote_facts is kept for backwards compatibility but
182 usage is discouraged. The module documentation details page may explain more
183about this rationale.. This feature will be removed in a future release.
184Deprecation warnings can be disabled by setting deprecation_warnings=False in
185ansible.cfg.
186PLAY [Filter hosts] ************************************************************
187
188TASK [ec2_filter_hosts : Get Hosts] ********************************************
189Friday 31 January 2020 16:46:22 +0000 (0:00:00.592) 0:00:00.592 ********
190ok: [localhost]
191
192TASK [ec2_filter_hosts : Write Instance ID out to a file] **********************
193Friday 31 January 2020 16:46:26 +0000 (0:00:04.351) 0:00:04.944 ********
194changed: [localhost]
195
196TASK [ec2_filter_hosts : debug] ************************************************
197Friday 31 January 2020 16:46:27 +0000 (0:00:00.390) 0:00:05.334 ********
198ok: [localhost] => {
199 "msg": "Instance IDs are i-0302cb339815932df"
200}
201
202PLAY RECAP *********************************************************************
203localhost : ok=3 changed=1 unreachable=0 failed=0
204
205Friday 31 January 2020 16:46:27 +0000 (0:00:00.023) 0:00:05.358 ********
206===============================================================================
207ec2_filter_hosts : Get Hosts -------------------------------------------- 4.35s
208ec2_filter_hosts : Write Instance ID out to a file ---------------------- 0.39s
209ec2_filter_hosts : debug ------------------------------------------------ 0.02s
210Waiting for the completion of Ansible_HA_Subnets
211Ansible_HA_Subnets #39699 completed. Result was SUCCESS
212Build step 'Trigger/call builds on other projects' changed build result to SUCCESS
213Copied 1 artifact from "Ansible_HA_Subnets" build number 39699
214[Core_Report] $ /home/jenkins/.local/bin/ansible-playbook /home/jenkins/workspace/Core_Report/core-report-sb.yml -i /tmp/inventory464373533313533849.ini -f 5 -e bld_env=qa -e size=t2.micro -e region=us-east-1 -e vpc_subnet=subnet-21ac5e56,subnet-ebf4c8c3,subnet-ecf4c8c4,subnet-20ac5e57 -e ip=yes -e key=i360-dev-aws-key -e security_group=IadSgQaSshInt,IadSgQaTomcatInt -e name=core-report-qa -e app_name=core-report-qa -e iam=X-Ray-Access -e product=Common -vvvvvvv
215ansible-playbook 2.5.5
216 config file = /etc/ansible/ansible.cfg
217 configured module search path = [u'/home/jenkins/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
218 ansible python module location = /home/jenkins/.local/lib/python2.7/site-packages/ansible
219 executable location = /home/jenkins/.local/bin/ansible-playbook
220 python version = 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516]
221Using /etc/ansible/ansible.cfg as config file
222Reading vault password file: /home/jenkins/.ansible_vault_pass
223setting up inventory plugins
224Parsed /tmp/inventory464373533313533849.ini inventory source with ini plugin
225 [WARNING]: provided hosts list is empty, only localhost is available. Note
226that the implicit localhost does not match 'all'
227
228Found a vault_id (default) in the vaulttext
229We have a secret associated with vault id (default), will try to use to decrypt /opt/ansible/vault/qa.yml
230Trying to use vault secret=(FileVaultSecret(filename='/home/jenkins/.ansible_vault_pass')) id=default to decrypt /opt/ansible/vault/qa.yml
231Trying secret FileVaultSecret(filename='/home/jenkins/.ansible_vault_pass') for vault_id=default
232Decrypt of "/opt/ansible/vault/qa.yml" successful with secret=FileVaultSecret(filename='/home/jenkins/.ansible_vault_pass') and vault_id=default
233Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
234[DEPRECATION WARNING]: ec2_ami_find is kept for backwards compatibility but
235usage is discouraged. The module documentation details page may explain more
236about this rationale.. This feature will be removed in a future release.
237Deprecation warnings can be disabled by setting deprecation_warnings=False in
238ansible.cfg.
239Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
240[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and
241make sure become_method is 'sudo' (default). This feature will be removed in
242version 2.6. Deprecation warnings can be disabled by setting
243deprecation_warnings=False in ansible.cfg.
244Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
245Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
246Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
247Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
248Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
249Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
250statically imported: /home/jenkins/workspace/Core_Report/roles/gvr_packages/tasks/centos.yml
251 [WARNING]: Ignoring invalid attribute: sudo
252
253Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
254statically imported: /home/jenkins/workspace/Core_Report/roles/gvr_packages/tasks/debian.yml
255Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
256statically imported: /home/jenkins/workspace/Core_Report/roles/gvr_packages/tasks/rhel.yml
257Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
258statically imported: /home/jenkins/workspace/Core_Report/roles/gvr_packages/tasks/filebeat.yml
259Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
260statically imported: /home/jenkins/workspace/Core_Report/roles/gvr_packages/tasks/add_users.yml
261Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
262statically imported: /home/jenkins/workspace/Core_Report/roles/cloud-ca/tasks/rhel.yml
263Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
264statically imported: /home/jenkins/workspace/Core_Report/roles/cloud-ca/tasks/debian.yml
265Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
266Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
267Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
268[DEPRECATION WARNING]: ec2_remote_facts is kept for backwards compatibility but
269 usage is discouraged. The module documentation details page may explain more
270about this rationale.. This feature will be removed in a future release.
271Deprecation warnings can be disabled by setting deprecation_warnings=False in
272ansible.cfg.
273Loading callback plugin default of type stdout, v2.0 from /home/jenkins/.local/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc
274Loading callback plugin profile_tasks of type aggregate, v2.0 from /home/jenkins/.local/lib/python2.7/site-packages/ansible/plugins/callback/profile_tasks.pyc
275
276PLAYBOOK: core-report-sb.yml ***************************************************
2774 plays in /home/jenkins/workspace/Core_Report/core-report-sb.yml
278Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
279Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
280 [WARNING]: Found variable using reserved name: name
281
282
283PLAY [Find Image] **************************************************************
284Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
285
286TASK [Gathering Facts] *********************************************************
287task path: /home/jenkins/workspace/Core_Report/core-report-sb.yml:3
288Friday 31 January 2020 16:47:47 +0000 (0:00:00.081) 0:00:00.081 ********
289Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/basic.py
290Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/__init__.py
291Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/namespace.py
292Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/ansible_collector.py
293Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/default_collectors.py
294Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/_text.py
295Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/parsing/convert_bool.py
296Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/parsing/__init__.py
297Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/pycompat24.py
298Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/six/__init__.py
299Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/compat.py
300Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/timeout.py
301Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/collector.py
302Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/freebsd.py
303Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/openbsd.py
304Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/base.py
305Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/dragonfly.py
306Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/dragonfly.py
307Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/aix.py
308Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/aix.py
309Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/linux.py
310Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/platform.py
311Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/hpux.py
312Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/user.py
313Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/hurd.py
314Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/other/facter.py
315Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/sunos.py
316Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/hpux.py
317Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/distribution.py
318Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/freebsd.py
319Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/__init__.py
320Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/openbsd.py
321Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/darwin.py
322Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/linux.py
323Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/sunos.py
324Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/sunos.py
325Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/chroot.py
326Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/apparmor.py
327Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/openbsd.py
328Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/local.py
329Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/other/ohai.py
330Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/other/__init__.py
331Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/service_mgr.py
332Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/hurd.py
333Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/hpux.py
334Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/fips.py
335Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/selinux.py
336Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/__init__.py
337Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/pkg_mgr.py
338Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/dns.py
339Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/base.py
340Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/darwin.py
341Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/dragonfly.py
342Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/ssh_pub_keys.py
343Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/__init__.py
344Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/__init__.py
345Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/lsb.py
346Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/date_time.py
347Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/netbsd.py
348Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/base.py
349Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/cmdline.py
350Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/freebsd.py
351Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/netbsd.py
352Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/netbsd.py
353Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/caps.py
354Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/env.py
355Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/linux.py
356Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/system/python.py
357Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/network/generic_bsd.py
358Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/sysctl.py
359Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/utils.py
360Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/facts/sysctl.py
361Using module file /home/jenkins/.local/lib/python2.7/site-packages/ansible/modules/system/setup.py
362<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jenkins
363<127.0.0.1> EXEC /bin/sh -c 'echo ~jenkins && sleep 0'
364<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489270.38-246699115065333 `" && echo ansible-tmp-1580489270.38-246699115065333="` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489270.38-246699115065333 `" ) && sleep 0'
365<127.0.0.1> PUT /home/jenkins/.ansible/tmp/ansible-local-2845gG_U9/tmpn5Bka0 TO /home/jenkins/.ansible/tmp/ansible-tmp-1580489270.38-246699115065333/setup.py
366<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/jenkins/.ansible/tmp/ansible-tmp-1580489270.38-246699115065333/ /home/jenkins/.ansible/tmp/ansible-tmp-1580489270.38-246699115065333/setup.py && sleep 0'
367<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /home/jenkins/.ansible/tmp/ansible-tmp-1580489270.38-246699115065333/setup.py && sleep 0'
368<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/jenkins/.ansible/tmp/ansible-tmp-1580489270.38-246699115065333/ > /dev/null 2>&1 && sleep 0'
369ok: [localhost]
370META: ran handlers
371Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
372
373TASK [find_gvr_ami : Find latest GVR Linux Image] ******************************
374task path: /home/jenkins/workspace/Core_Report/roles/find_gvr_ami/tasks/main.yml:4
375Friday 31 January 2020 16:47:52 +0000 (0:00:05.088) 0:00:05.170 ********
376Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/basic.py
377Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/ec2.py
378Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/_text.py
379Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/parsing/convert_bool.py
380Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/parsing/__init__.py
381Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/pycompat24.py
382Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/six/__init__.py
383Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/cloud.py
384Using module file /home/jenkins/.local/lib/python2.7/site-packages/ansible/modules/cloud/amazon/_ec2_ami_find.py
385<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jenkins
386<127.0.0.1> EXEC /bin/sh -c 'echo ~jenkins && sleep 0'
387<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489272.65-115853476596484 `" && echo ansible-tmp-1580489272.65-115853476596484="` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489272.65-115853476596484 `" ) && sleep 0'
388<127.0.0.1> PUT /home/jenkins/.ansible/tmp/ansible-local-2845gG_U9/tmpYDOSnt TO /home/jenkins/.ansible/tmp/ansible-tmp-1580489272.65-115853476596484/_ec2_ami_find.py
389<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/jenkins/.ansible/tmp/ansible-tmp-1580489272.65-115853476596484/ /home/jenkins/.ansible/tmp/ansible-tmp-1580489272.65-115853476596484/_ec2_ami_find.py && sleep 0'
390<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /home/jenkins/.ansible/tmp/ansible-tmp-1580489272.65-115853476596484/_ec2_ami_find.py && sleep 0'
391<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/jenkins/.ansible/tmp/ansible-tmp-1580489272.65-115853476596484/ > /dev/null 2>&1 && sleep 0'
392[DEPRECATION WARNING]: The 'ec2_ami_find' module has been deprecated. Use
393'ec2_ami_facts' instead.. This feature will be removed in version 2.9.
394Deprecation warnings can be disabled by setting deprecation_warnings=False in
395ansible.cfg.
396ok: [localhost] => {
397 "changed": false,
398 "invocation": {
399 "module_args": {
400 "ami_id": null,
401 "ami_tags": null,
402 "architecture": "x86_64",
403 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
404 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
405 "ec2_url": null,
406 "hypervisor": null,
407 "is_public": null,
408 "name": "AWSLinux-*",
409 "no_result_action": "fail",
410 "owner": "self",
411 "platform": null,
412 "product_code": null,
413 "profile": null,
414 "region": "us-east-1",
415 "security_token": null,
416 "sort": "creationDate",
417 "sort_end": "1",
418 "sort_order": "ascending",
419 "sort_start": null,
420 "sort_tag": null,
421 "state": "available",
422 "validate_certs": true,
423 "virtualization_type": "hvm"
424 }
425 },
426 "results": [
427 {
428 "ami_id": "ami-04823d299323c9f7b",
429 "architecture": "x86_64",
430 "block_device_mapping": {
431 "/dev/xvda": {
432 "delete_on_termination": true,
433 "encrypted": false,
434 "size": 8,
435 "snapshot_id": "snap-0eec64178d4fa45fc",
436 "volume_type": "gp2"
437 }
438 },
439 "creationDate": "2020-01-17T07:09:16.000Z",
440 "description": "",
441 "hypervisor": "xen",
442 "is_public": false,
443 "location": "455715156556/AWSLinux-20200117",
444 "name": "AWSLinux-20200117",
445 "owner_id": "455715156556",
446 "platform": null,
447 "root_device_name": "/dev/xvda",
448 "root_device_type": "ebs",
449 "state": "available",
450 "tags": {
451 "Name": "AWSLinux-20200117"
452 },
453 "virtualization_type": "hvm"
454 }
455 ]
456}
457Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
458
459TASK [find_gvr_ami : Results] **************************************************
460task path: /home/jenkins/workspace/Core_Report/roles/find_gvr_ami/tasks/main.yml:19
461Friday 31 January 2020 16:47:52 +0000 (0:00:00.509) 0:00:05.679 ********
462ok: [localhost] => {
463 "msg": "ami-04823d299323c9f7b"
464}
465Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
466
467TASK [find_gvr_ami : Debug hostvars] *******************************************
468task path: /home/jenkins/workspace/Core_Report/roles/find_gvr_ami/tasks/main.yml:22
469Friday 31 January 2020 16:47:53 +0000 (0:00:00.033) 0:00:05.712 ********
470ok: [localhost] => {
471 "msg": "ami-04823d299323c9f7b"
472}
473META: ran handlers
474META: ran handlers
475Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
476Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
477
478PLAY [Launch EC2 host] *********************************************************
479META: ran handlers
480Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
481
482TASK [ec2_create : Launch Instance(s)] *****************************************
483task path: /home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:2
484Friday 31 January 2020 16:47:53 +0000 (0:00:00.084) 0:00:05.797 ********
485looking for "./qa.ini" at "/home/jenkins/workspace/Core_Report/roles/ec2_create/files/./qa.ini"
486looking for "./qa.ini" at "/home/jenkins/workspace/Core_Report/roles/ec2_create/./qa.ini"
487looking for "./qa.ini" at "/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/files/./qa.ini"
488looking for "./qa.ini" at "/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/./qa.ini"
489looking for "./qa.ini" at "/home/jenkins/workspace/Core_Report/files/./qa.ini"
490looking for "./qa.ini" at "/home/jenkins/workspace/Core_Report/./qa.ini"
491Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/_text.py
492Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/basic.py
493Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/ec2.py
494Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/six/__init__.py
495Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/parsing/convert_bool.py
496Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/parsing/__init__.py
497Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/pycompat24.py
498Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/cloud.py
499Using module file /home/jenkins/.local/lib/python2.7/site-packages/ansible/modules/cloud/amazon/ec2.py
500<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jenkins
501<127.0.0.1> EXEC /bin/sh -c 'echo ~jenkins && sleep 0'
502<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489273.75-57755716954504 `" && echo ansible-tmp-1580489273.75-57755716954504="` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489273.75-57755716954504 `" ) && sleep 0'
503<127.0.0.1> PUT /home/jenkins/.ansible/tmp/ansible-local-2845gG_U9/tmpYpznep TO /home/jenkins/.ansible/tmp/ansible-tmp-1580489273.75-57755716954504/ec2.py
504<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/jenkins/.ansible/tmp/ansible-tmp-1580489273.75-57755716954504/ /home/jenkins/.ansible/tmp/ansible-tmp-1580489273.75-57755716954504/ec2.py && sleep 0'
505<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /home/jenkins/.ansible/tmp/ansible-tmp-1580489273.75-57755716954504/ec2.py && sleep 0'
506<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/jenkins/.ansible/tmp/ansible-tmp-1580489273.75-57755716954504/ > /dev/null 2>&1 && sleep 0'
507changed: [localhost] => (item=subnet-21ac5e56) => {
508 "changed": true,
509 "instance_ids": [
510 "i-0f1781aaa4b9a5eda"
511 ],
512 "instances": [
513 {
514 "ami_launch_index": "0",
515 "architecture": "x86_64",
516 "block_device_mapping": {
517 "/dev/xvda": {
518 "delete_on_termination": true,
519 "status": "attached",
520 "volume_id": "vol-0a5b3667cd810d820"
521 },
522 "/dev/xvdb": {
523 "delete_on_termination": true,
524 "status": "attached",
525 "volume_id": "vol-0e64b16e12627b944"
526 }
527 },
528 "dns_name": "",
529 "ebs_optimized": false,
530 "groups": {
531 "sg-50e4a734": "IadSgQaSshInt",
532 "sg-75e6a511": "IadSgQaTomcatInt"
533 },
534 "hypervisor": "xen",
535 "id": "i-0f1781aaa4b9a5eda",
536 "image_id": "ami-04823d299323c9f7b",
537 "instance_type": "t2.micro",
538 "kernel": null,
539 "key_name": "i360-dev-aws-key",
540 "launch_time": "2020-01-31T16:47:55.000Z",
541 "placement": "us-east-1b",
542 "private_dns_name": "ip-192-168-39-58.qa.aws.gilbarco.com",
543 "private_ip": "192.168.39.58",
544 "public_dns_name": "",
545 "public_ip": "3.80.28.152",
546 "ramdisk": null,
547 "region": "us-east-1",
548 "root_device_name": "/dev/xvda",
549 "root_device_type": "ebs",
550 "state": "running",
551 "state_code": 16,
552 "tags": {
553 "Name": "core-report-qa",
554 "app_name": "core-report-qa",
555 "bld_env": "qa",
556 "product-line": "Common",
557 "server": "core-report-qa-qa"
558 },
559 "tenancy": "default",
560 "virtualization_type": "hvm"
561 }
562 ],
563 "invocation": {
564 "module_args": {
565 "assign_public_ip": true,
566 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
567 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
568 "count": 1,
569 "count_tag": null,
570 "ebs_optimized": false,
571 "ec2_url": null,
572 "exact_count": null,
573 "group": [
574 "IadSgQaSshInt",
575 "IadSgQaTomcatInt"
576 ],
577 "group_id": null,
578 "id": null,
579 "image": "ami-04823d299323c9f7b",
580 "instance_ids": null,
581 "instance_initiated_shutdown_behavior": null,
582 "instance_profile_name": "X-Ray-Access",
583 "instance_tags": {
584 "Name": "core-report-qa",
585 "app_name": "core-report-qa",
586 "bld_env": "qa",
587 "product-line": "Common",
588 "server": "core-report-qa-qa"
589 },
590 "instance_type": "t2.micro",
591 "kernel": null,
592 "key_name": "i360-dev-aws-key",
593 "keypair": "i360-dev-aws-key",
594 "monitoring": false,
595 "network_interfaces": null,
596 "placement_group": null,
597 "private_ip": null,
598 "profile": null,
599 "ramdisk": null,
600 "region": "us-east-1",
601 "security_token": null,
602 "source_dest_check": true,
603 "spot_launch_group": null,
604 "spot_price": null,
605 "spot_type": "one-time",
606 "spot_wait_timeout": "600",
607 "state": "present",
608 "tenancy": "default",
609 "termination_protection": null,
610 "user_data": null,
611 "validate_certs": true,
612 "volumes": [
613 {
614 "delete_on_termination": true,
615 "device_name": "/dev/xvdb",
616 "volume_size": "16",
617 "volume_type": "gp2"
618 }
619 ],
620 "vpc_subnet_id": "subnet-21ac5e56",
621 "wait": true,
622 "wait_timeout": "300",
623 "zone": null
624 }
625 },
626 "item": "subnet-21ac5e56",
627 "tagged_instances": []
628}
629Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
630
631TASK [ec2_create : Instance Ids] ***********************************************
632task path: /home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:23
633Friday 31 January 2020 16:48:26 +0000 (0:00:33.234) 0:00:39.031 ********
634ok: [localhost] => (item=None) => {
635 "msg": "i-0f1781aaa4b9a5eda"
636}
637Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
638
639TASK [ec2_create : Add hosts group temporary inventory group with pem path] ****
640task path: /home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:27
641Friday 31 January 2020 16:48:26 +0000 (0:00:00.319) 0:00:39.351 ********
642creating host via 'add_host': hostname=192.168.39.58
643changed: [localhost] => (item={'_ansible_parsed': True, u'changed': True, '_ansible_no_log': False, u'instances': [{u'kernel': None, u'root_device_type': u'ebs', u'private_dns_name': u'ip-192-168-39-58.qa.aws.gilbarco.com', u'public_ip': u'3.80.28.152', u'private_ip': u'192.168.39.58', u'id': u'i-0f1781aaa4b9a5eda', u'ebs_optimized': False, u'state': u'running', u'virtualization_type': u'hvm', u'root_device_name': u'/dev/xvda', u'ramdisk': None, u'block_device_mapping': {u'/dev/xvda': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0a5b3667cd810d820'}, u'/dev/xvdb': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0e64b16e12627b944'}}, u'key_name': u'i360-dev-aws-key', u'image_id': u'ami-04823d299323c9f7b', u'tenancy': u'default', u'groups': {u'sg-75e6a511': u'IadSgQaTomcatInt', u'sg-50e4a734': u'IadSgQaSshInt'}, u'public_dns_name': u'', u'state_code': 16, u'tags': {u'product-line': u'Common', u'bld_env': u'qa', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'server': u'core-report-qa-qa'}, u'placement': u'us-east-1b', u'ami_launch_index': u'0', u'dns_name': u'', u'region': u'us-east-1', u'launch_time': u'2020-01-31T16:47:55.000Z', u'instance_type': u't2.micro', u'architecture': u'x86_64', u'hypervisor': u'xen'}], '_ansible_item_result': True, u'instance_ids': [u'i-0f1781aaa4b9a5eda'], 'failed': False, u'tagged_instances': [], 'item': u'subnet-21ac5e56', u'invocation': {u'module_args': {u'kernel': None, u'image': u'ami-04823d299323c9f7b', u'monitoring': False, u'user_data': None, u'termination_protection': None, u'private_ip': None, u'spot_type': u'one-time', u'ec2_url': None, u'id': None, u'source_dest_check': True, u'aws_secret_key': u'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER', u'spot_wait_timeout': u'600', u'group': [u'IadSgQaSshInt', u'IadSgQaTomcatInt'], u'zone': None, u'exact_count': None, u'ebs_optimized': False, u'state': u'present', u'placement_group': None, u'spot_launch_group': None, u'key_name': u'i360-dev-aws-key', u'ramdisk': None, u'volumes': [{u'volume_size': u'16', u'delete_on_termination': True, u'volume_type': u'gp2', u'device_name': u'/dev/xvdb'}], u'count_tag': None, u'vpc_subnet_id': u'subnet-21ac5e56', u'instance_ids': None, u'tenancy': u'default', u'profile': None, u'assign_public_ip': True, u'spot_price': None, u'wait': True, u'count': 1, u'aws_access_key': u'AKIAICF4I4EPIEXMR4VQ', u'security_token': None, u'instance_profile_name': u'X-Ray-Access', u'region': u'us-east-1', u'network_interfaces': None, u'instance_initiated_shutdown_behavior': None, u'instance_type': u't2.micro', u'wait_timeout': u'300', u'keypair': u'i360-dev-aws-key', u'instance_tags': {u'product-line': u'Common', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'bld_env': u'qa', u'server': u'core-report-qa-qa'}, u'group_id': None, u'validate_certs': True}}, '_ansible_ignore_errors': None}) => {
644 "add_host": {
645 "groups": [
646 "ec2hosts"
647 ],
648 "host_name": "192.168.39.58",
649 "host_vars": {
650 "ansible_ssh_private_key_file": "~/.ssh/i360-dev-aws-key.pem",
651 "ansible_ssh_user": "ec2-user"
652 }
653 },
654 "changed": true,
655 "item": {
656 "changed": true,
657 "failed": false,
658 "instance_ids": [
659 "i-0f1781aaa4b9a5eda"
660 ],
661 "instances": [
662 {
663 "ami_launch_index": "0",
664 "architecture": "x86_64",
665 "block_device_mapping": {
666 "/dev/xvda": {
667 "delete_on_termination": true,
668 "status": "attached",
669 "volume_id": "vol-0a5b3667cd810d820"
670 },
671 "/dev/xvdb": {
672 "delete_on_termination": true,
673 "status": "attached",
674 "volume_id": "vol-0e64b16e12627b944"
675 }
676 },
677 "dns_name": "",
678 "ebs_optimized": false,
679 "groups": {
680 "sg-50e4a734": "IadSgQaSshInt",
681 "sg-75e6a511": "IadSgQaTomcatInt"
682 },
683 "hypervisor": "xen",
684 "id": "i-0f1781aaa4b9a5eda",
685 "image_id": "ami-04823d299323c9f7b",
686 "instance_type": "t2.micro",
687 "kernel": null,
688 "key_name": "i360-dev-aws-key",
689 "launch_time": "2020-01-31T16:47:55.000Z",
690 "placement": "us-east-1b",
691 "private_dns_name": "ip-192-168-39-58.qa.aws.gilbarco.com",
692 "private_ip": "192.168.39.58",
693 "public_dns_name": "",
694 "public_ip": "3.80.28.152",
695 "ramdisk": null,
696 "region": "us-east-1",
697 "root_device_name": "/dev/xvda",
698 "root_device_type": "ebs",
699 "state": "running",
700 "state_code": 16,
701 "tags": {
702 "Name": "core-report-qa",
703 "app_name": "core-report-qa",
704 "bld_env": "qa",
705 "product-line": "Common",
706 "server": "core-report-qa-qa"
707 },
708 "tenancy": "default",
709 "virtualization_type": "hvm"
710 }
711 ],
712 "invocation": {
713 "module_args": {
714 "assign_public_ip": true,
715 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
716 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
717 "count": 1,
718 "count_tag": null,
719 "ebs_optimized": false,
720 "ec2_url": null,
721 "exact_count": null,
722 "group": [
723 "IadSgQaSshInt",
724 "IadSgQaTomcatInt"
725 ],
726 "group_id": null,
727 "id": null,
728 "image": "ami-04823d299323c9f7b",
729 "instance_ids": null,
730 "instance_initiated_shutdown_behavior": null,
731 "instance_profile_name": "X-Ray-Access",
732 "instance_tags": {
733 "Name": "core-report-qa",
734 "app_name": "core-report-qa",
735 "bld_env": "qa",
736 "product-line": "Common",
737 "server": "core-report-qa-qa"
738 },
739 "instance_type": "t2.micro",
740 "kernel": null,
741 "key_name": "i360-dev-aws-key",
742 "keypair": "i360-dev-aws-key",
743 "monitoring": false,
744 "network_interfaces": null,
745 "placement_group": null,
746 "private_ip": null,
747 "profile": null,
748 "ramdisk": null,
749 "region": "us-east-1",
750 "security_token": null,
751 "source_dest_check": true,
752 "spot_launch_group": null,
753 "spot_price": null,
754 "spot_type": "one-time",
755 "spot_wait_timeout": "600",
756 "state": "present",
757 "tenancy": "default",
758 "termination_protection": null,
759 "user_data": null,
760 "validate_certs": true,
761 "volumes": [
762 {
763 "delete_on_termination": true,
764 "device_name": "/dev/xvdb",
765 "volume_size": "16",
766 "volume_type": "gp2"
767 }
768 ],
769 "vpc_subnet_id": "subnet-21ac5e56",
770 "wait": true,
771 "wait_timeout": "300",
772 "zone": null
773 }
774 },
775 "item": "subnet-21ac5e56",
776 "tagged_instances": []
777 }
778}
779Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
780
781TASK [ec2_create : Add hosts group temporary inventory group without pem path] ***
782task path: /home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:36
783Friday 31 January 2020 16:48:26 +0000 (0:00:00.156) 0:00:39.507 ********
784skipping: [localhost] => (item={'_ansible_parsed': True, u'changed': True, '_ansible_no_log': False, u'instances': [{u'kernel': None, u'root_device_type': u'ebs', u'private_dns_name': u'ip-192-168-39-58.qa.aws.gilbarco.com', u'public_ip': u'3.80.28.152', u'private_ip': u'192.168.39.58', u'id': u'i-0f1781aaa4b9a5eda', u'ebs_optimized': False, u'state': u'running', u'virtualization_type': u'hvm', u'root_device_name': u'/dev/xvda', u'ramdisk': None, u'block_device_mapping': {u'/dev/xvda': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0a5b3667cd810d820'}, u'/dev/xvdb': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0e64b16e12627b944'}}, u'key_name': u'i360-dev-aws-key', u'image_id': u'ami-04823d299323c9f7b', u'tenancy': u'default', u'groups': {u'sg-75e6a511': u'IadSgQaTomcatInt', u'sg-50e4a734': u'IadSgQaSshInt'}, u'public_dns_name': u'', u'state_code': 16, u'tags': {u'product-line': u'Common', u'bld_env': u'qa', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'server': u'core-report-qa-qa'}, u'placement': u'us-east-1b', u'ami_launch_index': u'0', u'dns_name': u'', u'region': u'us-east-1', u'launch_time': u'2020-01-31T16:47:55.000Z', u'instance_type': u't2.micro', u'architecture': u'x86_64', u'hypervisor': u'xen'}], '_ansible_item_result': True, u'instance_ids': [u'i-0f1781aaa4b9a5eda'], 'failed': False, u'tagged_instances': [], 'item': u'subnet-21ac5e56', u'invocation': {u'module_args': {u'kernel': None, u'image': u'ami-04823d299323c9f7b', u'monitoring': False, u'user_data': None, u'termination_protection': None, u'private_ip': None, u'spot_type': u'one-time', u'ec2_url': None, u'id': None, u'source_dest_check': True, u'aws_secret_key': u'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER', u'spot_wait_timeout': u'600', u'group': [u'IadSgQaSshInt', u'IadSgQaTomcatInt'], u'zone': None, u'exact_count': None, u'ebs_optimized': False, u'state': u'present', u'placement_group': None, u'spot_launch_group': None, u'key_name': u'i360-dev-aws-key', u'ramdisk': None, u'volumes': [{u'volume_size': u'16', u'delete_on_termination': True, u'volume_type': u'gp2', u'device_name': u'/dev/xvdb'}], u'count_tag': None, u'vpc_subnet_id': u'subnet-21ac5e56', u'instance_ids': None, u'tenancy': u'default', u'profile': None, u'assign_public_ip': True, u'spot_price': None, u'wait': True, u'count': 1, u'aws_access_key': u'AKIAICF4I4EPIEXMR4VQ', u'security_token': None, u'instance_profile_name': u'X-Ray-Access', u'region': u'us-east-1', u'network_interfaces': None, u'instance_initiated_shutdown_behavior': None, u'instance_type': u't2.micro', u'wait_timeout': u'300', u'keypair': u'i360-dev-aws-key', u'instance_tags': {u'product-line': u'Common', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'bld_env': u'qa', u'server': u'core-report-qa-qa'}, u'group_id': None, u'validate_certs': True}}, '_ansible_ignore_errors': None}) => {
785 "changed": false,
786 "item": {
787 "changed": true,
788 "failed": false,
789 "instance_ids": [
790 "i-0f1781aaa4b9a5eda"
791 ],
792 "instances": [
793 {
794 "ami_launch_index": "0",
795 "architecture": "x86_64",
796 "block_device_mapping": {
797 "/dev/xvda": {
798 "delete_on_termination": true,
799 "status": "attached",
800 "volume_id": "vol-0a5b3667cd810d820"
801 },
802 "/dev/xvdb": {
803 "delete_on_termination": true,
804 "status": "attached",
805 "volume_id": "vol-0e64b16e12627b944"
806 }
807 },
808 "dns_name": "",
809 "ebs_optimized": false,
810 "groups": {
811 "sg-50e4a734": "IadSgQaSshInt",
812 "sg-75e6a511": "IadSgQaTomcatInt"
813 },
814 "hypervisor": "xen",
815 "id": "i-0f1781aaa4b9a5eda",
816 "image_id": "ami-04823d299323c9f7b",
817 "instance_type": "t2.micro",
818 "kernel": null,
819 "key_name": "i360-dev-aws-key",
820 "launch_time": "2020-01-31T16:47:55.000Z",
821 "placement": "us-east-1b",
822 "private_dns_name": "ip-192-168-39-58.qa.aws.gilbarco.com",
823 "private_ip": "192.168.39.58",
824 "public_dns_name": "",
825 "public_ip": "3.80.28.152",
826 "ramdisk": null,
827 "region": "us-east-1",
828 "root_device_name": "/dev/xvda",
829 "root_device_type": "ebs",
830 "state": "running",
831 "state_code": 16,
832 "tags": {
833 "Name": "core-report-qa",
834 "app_name": "core-report-qa",
835 "bld_env": "qa",
836 "product-line": "Common",
837 "server": "core-report-qa-qa"
838 },
839 "tenancy": "default",
840 "virtualization_type": "hvm"
841 }
842 ],
843 "invocation": {
844 "module_args": {
845 "assign_public_ip": true,
846 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
847 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
848 "count": 1,
849 "count_tag": null,
850 "ebs_optimized": false,
851 "ec2_url": null,
852 "exact_count": null,
853 "group": [
854 "IadSgQaSshInt",
855 "IadSgQaTomcatInt"
856 ],
857 "group_id": null,
858 "id": null,
859 "image": "ami-04823d299323c9f7b",
860 "instance_ids": null,
861 "instance_initiated_shutdown_behavior": null,
862 "instance_profile_name": "X-Ray-Access",
863 "instance_tags": {
864 "Name": "core-report-qa",
865 "app_name": "core-report-qa",
866 "bld_env": "qa",
867 "product-line": "Common",
868 "server": "core-report-qa-qa"
869 },
870 "instance_type": "t2.micro",
871 "kernel": null,
872 "key_name": "i360-dev-aws-key",
873 "keypair": "i360-dev-aws-key",
874 "monitoring": false,
875 "network_interfaces": null,
876 "placement_group": null,
877 "private_ip": null,
878 "profile": null,
879 "ramdisk": null,
880 "region": "us-east-1",
881 "security_token": null,
882 "source_dest_check": true,
883 "spot_launch_group": null,
884 "spot_price": null,
885 "spot_type": "one-time",
886 "spot_wait_timeout": "600",
887 "state": "present",
888 "tenancy": "default",
889 "termination_protection": null,
890 "user_data": null,
891 "validate_certs": true,
892 "volumes": [
893 {
894 "delete_on_termination": true,
895 "device_name": "/dev/xvdb",
896 "volume_size": "16",
897 "volume_type": "gp2"
898 }
899 ],
900 "vpc_subnet_id": "subnet-21ac5e56",
901 "wait": true,
902 "wait_timeout": "300",
903 "zone": null
904 }
905 },
906 "item": "subnet-21ac5e56",
907 "tagged_instances": []
908 },
909 "skip_reason": "Conditional result was False"
910}
911Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
912
913TASK [ec2_create : Update Instance Name Tag(s)] ********************************
914task path: /home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:44
915Friday 31 January 2020 16:48:26 +0000 (0:00:00.037) 0:00:39.545 ********
916Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/basic.py
917Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/ec2.py
918Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/_text.py
919Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/parsing/convert_bool.py
920Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/parsing/__init__.py
921Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/pycompat24.py
922Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/six/__init__.py
923Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/cloud.py
924Using module file /home/jenkins/.local/lib/python2.7/site-packages/ansible/modules/cloud/amazon/ec2_tag.py
925<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jenkins
926<127.0.0.1> EXEC /bin/sh -c 'echo ~jenkins && sleep 0'
927<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.07-167860545544378 `" && echo ansible-tmp-1580489307.07-167860545544378="` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.07-167860545544378 `" ) && sleep 0'
928<127.0.0.1> PUT /home/jenkins/.ansible/tmp/ansible-local-2845gG_U9/tmpbFG4xg TO /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.07-167860545544378/ec2_tag.py
929<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.07-167860545544378/ /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.07-167860545544378/ec2_tag.py && sleep 0'
930<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.07-167860545544378/ec2_tag.py && sleep 0'
931<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.07-167860545544378/ > /dev/null 2>&1 && sleep 0'
932changed: [localhost] => (item={'_ansible_parsed': True, u'changed': True, '_ansible_no_log': False, u'instances': [{u'kernel': None, u'root_device_type': u'ebs', u'private_dns_name': u'ip-192-168-39-58.qa.aws.gilbarco.com', u'public_ip': u'3.80.28.152', u'private_ip': u'192.168.39.58', u'id': u'i-0f1781aaa4b9a5eda', u'ebs_optimized': False, u'state': u'running', u'virtualization_type': u'hvm', u'root_device_name': u'/dev/xvda', u'ramdisk': None, u'block_device_mapping': {u'/dev/xvda': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0a5b3667cd810d820'}, u'/dev/xvdb': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0e64b16e12627b944'}}, u'key_name': u'i360-dev-aws-key', u'image_id': u'ami-04823d299323c9f7b', u'tenancy': u'default', u'groups': {u'sg-75e6a511': u'IadSgQaTomcatInt', u'sg-50e4a734': u'IadSgQaSshInt'}, u'public_dns_name': u'', u'state_code': 16, u'tags': {u'product-line': u'Common', u'bld_env': u'qa', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'server': u'core-report-qa-qa'}, u'placement': u'us-east-1b', u'ami_launch_index': u'0', u'dns_name': u'', u'region': u'us-east-1', u'launch_time': u'2020-01-31T16:47:55.000Z', u'instance_type': u't2.micro', u'architecture': u'x86_64', u'hypervisor': u'xen'}], '_ansible_item_result': True, u'instance_ids': [u'i-0f1781aaa4b9a5eda'], 'failed': False, u'tagged_instances': [], 'item': u'subnet-21ac5e56', u'invocation': {u'module_args': {u'kernel': None, u'image': u'ami-04823d299323c9f7b', u'monitoring': False, u'user_data': None, u'termination_protection': None, u'private_ip': None, u'spot_type': u'one-time', u'ec2_url': None, u'id': None, u'source_dest_check': True, u'aws_secret_key': u'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER', u'spot_wait_timeout': u'600', u'group': [u'IadSgQaSshInt', u'IadSgQaTomcatInt'], u'zone': None, u'exact_count': None, u'ebs_optimized': False, u'state': u'present', u'placement_group': None, u'spot_launch_group': None, u'key_name': u'i360-dev-aws-key', u'ramdisk': None, u'volumes': [{u'volume_size': u'16', u'delete_on_termination': True, u'volume_type': u'gp2', u'device_name': u'/dev/xvdb'}], u'count_tag': None, u'vpc_subnet_id': u'subnet-21ac5e56', u'instance_ids': None, u'tenancy': u'default', u'profile': None, u'assign_public_ip': True, u'spot_price': None, u'wait': True, u'count': 1, u'aws_access_key': u'AKIAICF4I4EPIEXMR4VQ', u'security_token': None, u'instance_profile_name': u'X-Ray-Access', u'region': u'us-east-1', u'network_interfaces': None, u'instance_initiated_shutdown_behavior': None, u'instance_type': u't2.micro', u'wait_timeout': u'300', u'keypair': u'i360-dev-aws-key', u'instance_tags': {u'product-line': u'Common', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'bld_env': u'qa', u'server': u'core-report-qa-qa'}, u'group_id': None, u'validate_certs': True}}, '_ansible_ignore_errors': None}) => {
933 "changed": true,
934 "invocation": {
935 "module_args": {
936 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
937 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
938 "ec2_url": null,
939 "profile": null,
940 "region": "us-east-1",
941 "resource": "i-0f1781aaa4b9a5eda",
942 "security_token": null,
943 "state": "present",
944 "tags": {
945 "Name": "core-report-qa - 192.168.39.58"
946 },
947 "validate_certs": true
948 }
949 },
950 "item": {
951 "changed": true,
952 "failed": false,
953 "instance_ids": [
954 "i-0f1781aaa4b9a5eda"
955 ],
956 "instances": [
957 {
958 "ami_launch_index": "0",
959 "architecture": "x86_64",
960 "block_device_mapping": {
961 "/dev/xvda": {
962 "delete_on_termination": true,
963 "status": "attached",
964 "volume_id": "vol-0a5b3667cd810d820"
965 },
966 "/dev/xvdb": {
967 "delete_on_termination": true,
968 "status": "attached",
969 "volume_id": "vol-0e64b16e12627b944"
970 }
971 },
972 "dns_name": "",
973 "ebs_optimized": false,
974 "groups": {
975 "sg-50e4a734": "IadSgQaSshInt",
976 "sg-75e6a511": "IadSgQaTomcatInt"
977 },
978 "hypervisor": "xen",
979 "id": "i-0f1781aaa4b9a5eda",
980 "image_id": "ami-04823d299323c9f7b",
981 "instance_type": "t2.micro",
982 "kernel": null,
983 "key_name": "i360-dev-aws-key",
984 "launch_time": "2020-01-31T16:47:55.000Z",
985 "placement": "us-east-1b",
986 "private_dns_name": "ip-192-168-39-58.qa.aws.gilbarco.com",
987 "private_ip": "192.168.39.58",
988 "public_dns_name": "",
989 "public_ip": "3.80.28.152",
990 "ramdisk": null,
991 "region": "us-east-1",
992 "root_device_name": "/dev/xvda",
993 "root_device_type": "ebs",
994 "state": "running",
995 "state_code": 16,
996 "tags": {
997 "Name": "core-report-qa",
998 "app_name": "core-report-qa",
999 "bld_env": "qa",
1000 "product-line": "Common",
1001 "server": "core-report-qa-qa"
1002 },
1003 "tenancy": "default",
1004 "virtualization_type": "hvm"
1005 }
1006 ],
1007 "invocation": {
1008 "module_args": {
1009 "assign_public_ip": true,
1010 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
1011 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
1012 "count": 1,
1013 "count_tag": null,
1014 "ebs_optimized": false,
1015 "ec2_url": null,
1016 "exact_count": null,
1017 "group": [
1018 "IadSgQaSshInt",
1019 "IadSgQaTomcatInt"
1020 ],
1021 "group_id": null,
1022 "id": null,
1023 "image": "ami-04823d299323c9f7b",
1024 "instance_ids": null,
1025 "instance_initiated_shutdown_behavior": null,
1026 "instance_profile_name": "X-Ray-Access",
1027 "instance_tags": {
1028 "Name": "core-report-qa",
1029 "app_name": "core-report-qa",
1030 "bld_env": "qa",
1031 "product-line": "Common",
1032 "server": "core-report-qa-qa"
1033 },
1034 "instance_type": "t2.micro",
1035 "kernel": null,
1036 "key_name": "i360-dev-aws-key",
1037 "keypair": "i360-dev-aws-key",
1038 "monitoring": false,
1039 "network_interfaces": null,
1040 "placement_group": null,
1041 "private_ip": null,
1042 "profile": null,
1043 "ramdisk": null,
1044 "region": "us-east-1",
1045 "security_token": null,
1046 "source_dest_check": true,
1047 "spot_launch_group": null,
1048 "spot_price": null,
1049 "spot_type": "one-time",
1050 "spot_wait_timeout": "600",
1051 "state": "present",
1052 "tenancy": "default",
1053 "termination_protection": null,
1054 "user_data": null,
1055 "validate_certs": true,
1056 "volumes": [
1057 {
1058 "delete_on_termination": true,
1059 "device_name": "/dev/xvdb",
1060 "volume_size": "16",
1061 "volume_type": "gp2"
1062 }
1063 ],
1064 "vpc_subnet_id": "subnet-21ac5e56",
1065 "wait": true,
1066 "wait_timeout": "300",
1067 "zone": null
1068 }
1069 },
1070 "item": "subnet-21ac5e56",
1071 "tagged_instances": []
1072 },
1073 "msg": "Tags {'Name': 'core-report-qa - 192.168.39.58'} created for resource i-0f1781aaa4b9a5eda."
1074}
1075Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
1076
1077TASK [ec2_create : Scheduler Instance Name Tag(s) in dev] *********************
1078task path: /home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:54
1079Friday 31 January 2020 16:48:27 +0000 (0:00:00.783) 0:00:40.328 ********
1080skipping: [localhost] => (item={'_ansible_parsed': True, u'changed': True, '_ansible_no_log': False, u'instances': [{u'kernel': None, u'root_device_type': u'ebs', u'private_dns_name': u'ip-192-168-39-58.qa.aws.gilbarco.com', u'public_ip': u'3.80.28.152', u'private_ip': u'192.168.39.58', u'id': u'i-0f1781aaa4b9a5eda', u'ebs_optimized': False, u'state': u'running', u'virtualization_type': u'hvm', u'root_device_name': u'/dev/xvda', u'ramdisk': None, u'block_device_mapping': {u'/dev/xvda': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0a5b3667cd810d820'}, u'/dev/xvdb': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0e64b16e12627b944'}}, u'key_name': u'i360-dev-aws-key', u'image_id': u'ami-04823d299323c9f7b', u'tenancy': u'default', u'groups': {u'sg-75e6a511': u'IadSgQaTomcatInt', u'sg-50e4a734': u'IadSgQaSshInt'}, u'public_dns_name': u'', u'state_code': 16, u'tags': {u'product-line': u'Common', u'bld_env': u'qa', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'server': u'core-report-qa-qa'}, u'placement': u'us-east-1b', u'ami_launch_index': u'0', u'dns_name': u'', u'region': u'us-east-1', u'launch_time': u'2020-01-31T16:47:55.000Z', u'instance_type': u't2.micro', u'architecture': u'x86_64', u'hypervisor': u'xen'}], '_ansible_item_result': True, u'instance_ids': [u'i-0f1781aaa4b9a5eda'], 'failed': False, u'tagged_instances': [], 'item': u'subnet-21ac5e56', u'invocation': {u'module_args': {u'kernel': None, u'image': u'ami-04823d299323c9f7b', u'monitoring': False, u'user_data': None, u'termination_protection': None, u'private_ip': None, u'spot_type': u'one-time', u'ec2_url': None, u'id': None, u'source_dest_check': True, u'aws_secret_key': u'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER', u'spot_wait_timeout': u'600', u'group': [u'IadSgQaSshInt', u'IadSgQaTomcatInt'], u'zone': None, u'exact_count': None, u'ebs_optimized': False, u'state': u'present', u'placement_group': None, u'spot_launch_group': None, u'key_name': u'i360-dev-aws-key', u'ramdisk': None, u'volumes': [{u'volume_size': u'16', u'delete_on_termination': True, u'volume_type': u'gp2', u'device_name': u'/dev/xvdb'}], u'count_tag': None, u'vpc_subnet_id': u'subnet-21ac5e56', u'instance_ids': None, u'tenancy': u'default', u'profile': None, u'assign_public_ip': True, u'spot_price': None, u'wait': True, u'count': 1, u'aws_access_key': u'AKIAICF4I4EPIEXMR4VQ', u'security_token': None, u'instance_profile_name': u'X-Ray-Access', u'region': u'us-east-1', u'network_interfaces': None, u'instance_initiated_shutdown_behavior': None, u'instance_type': u't2.micro', u'wait_timeout': u'300', u'keypair': u'i360-dev-aws-key', u'instance_tags': {u'product-line': u'Common', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'bld_env': u'qa', u'server': u'core-report-qa-qa'}, u'group_id': None, u'validate_certs': True}}, '_ansible_ignore_errors': None}) => {
1081 "changed": false,
1082 "item": {
1083 "changed": true,
1084 "failed": false,
1085 "instance_ids": [
1086 "i-0f1781aaa4b9a5eda"
1087 ],
1088 "instances": [
1089 {
1090 "ami_launch_index": "0",
1091 "architecture": "x86_64",
1092 "block_device_mapping": {
1093 "/dev/xvda": {
1094 "delete_on_termination": true,
1095 "status": "attached",
1096 "volume_id": "vol-0a5b3667cd810d820"
1097 },
1098 "/dev/xvdb": {
1099 "delete_on_termination": true,
1100 "status": "attached",
1101 "volume_id": "vol-0e64b16e12627b944"
1102 }
1103 },
1104 "dns_name": "",
1105 "ebs_optimized": false,
1106 "groups": {
1107 "sg-50e4a734": "IadSgQaSshInt",
1108 "sg-75e6a511": "IadSgQaTomcatInt"
1109 },
1110 "hypervisor": "xen",
1111 "id": "i-0f1781aaa4b9a5eda",
1112 "image_id": "ami-04823d299323c9f7b",
1113 "instance_type": "t2.micro",
1114 "kernel": null,
1115 "key_name": "i360-dev-aws-key",
1116 "launch_time": "2020-01-31T16:47:55.000Z",
1117 "placement": "us-east-1b",
1118 "private_dns_name": "ip-192-168-39-58.qa.aws.gilbarco.com",
1119 "private_ip": "192.168.39.58",
1120 "public_dns_name": "",
1121 "public_ip": "3.80.28.152",
1122 "ramdisk": null,
1123 "region": "us-east-1",
1124 "root_device_name": "/dev/xvda",
1125 "root_device_type": "ebs",
1126 "state": "running",
1127 "state_code": 16,
1128 "tags": {
1129 "Name": "core-report-qa",
1130 "app_name": "core-report-qa",
1131 "bld_env": "qa",
1132 "product-line": "Common",
1133 "server": "core-report-qa-qa"
1134 },
1135 "tenancy": "default",
1136 "virtualization_type": "hvm"
1137 }
1138 ],
1139 "invocation": {
1140 "module_args": {
1141 "assign_public_ip": true,
1142 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
1143 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
1144 "count": 1,
1145 "count_tag": null,
1146 "ebs_optimized": false,
1147 "ec2_url": null,
1148 "exact_count": null,
1149 "group": [
1150 "IadSgQaSshInt",
1151 "IadSgQaTomcatInt"
1152 ],
1153 "group_id": null,
1154 "id": null,
1155 "image": "ami-04823d299323c9f7b",
1156 "instance_ids": null,
1157 "instance_initiated_shutdown_behavior": null,
1158 "instance_profile_name": "X-Ray-Access",
1159 "instance_tags": {
1160 "Name": "core-report-qa",
1161 "app_name": "core-report-qa",
1162 "bld_env": "qa",
1163 "product-line": "Common",
1164 "server": "core-report-qa-qa"
1165 },
1166 "instance_type": "t2.micro",
1167 "kernel": null,
1168 "key_name": "i360-dev-aws-key",
1169 "keypair": "i360-dev-aws-key",
1170 "monitoring": false,
1171 "network_interfaces": null,
1172 "placement_group": null,
1173 "private_ip": null,
1174 "profile": null,
1175 "ramdisk": null,
1176 "region": "us-east-1",
1177 "security_token": null,
1178 "source_dest_check": true,
1179 "spot_launch_group": null,
1180 "spot_price": null,
1181 "spot_type": "one-time",
1182 "spot_wait_timeout": "600",
1183 "state": "present",
1184 "tenancy": "default",
1185 "termination_protection": null,
1186 "user_data": null,
1187 "validate_certs": true,
1188 "volumes": [
1189 {
1190 "delete_on_termination": true,
1191 "device_name": "/dev/xvdb",
1192 "volume_size": "16",
1193 "volume_type": "gp2"
1194 }
1195 ],
1196 "vpc_subnet_id": "subnet-21ac5e56",
1197 "wait": true,
1198 "wait_timeout": "300",
1199 "zone": null
1200 }
1201 },
1202 "item": "subnet-21ac5e56",
1203 "tagged_instances": []
1204 },
1205 "skip_reason": "Conditional result was False"
1206}
1207Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
1208
1209TASK [ec2_create : Scheduler Instance Name Tag(s) in Qa] **********************
1210task path: /home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:65
1211Friday 31 January 2020 16:48:27 +0000 (0:00:00.039) 0:00:40.367 ********
1212Using module file /home/jenkins/.local/lib/python2.7/site-packages/ansible/modules/cloud/amazon/ec2_tag.py
1213<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jenkins
1214<127.0.0.1> EXEC /bin/sh -c 'echo ~jenkins && sleep 0'
1215<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.71-242821787695944 `" && echo ansible-tmp-1580489307.71-242821787695944="` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.71-242821787695944 `" ) && sleep 0'
1216<127.0.0.1> PUT /home/jenkins/.ansible/tmp/ansible-local-2845gG_U9/tmpsKIt7K TO /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.71-242821787695944/ec2_tag.py
1217<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.71-242821787695944/ /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.71-242821787695944/ec2_tag.py && sleep 0'
1218<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.71-242821787695944/ec2_tag.py && sleep 0'
1219<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/jenkins/.ansible/tmp/ansible-tmp-1580489307.71-242821787695944/ > /dev/null 2>&1 && sleep 0'
1220changed: [localhost] => (item={'_ansible_parsed': True, u'changed': True, '_ansible_no_log': False, u'instances': [{u'kernel': None, u'root_device_type': u'ebs', u'private_dns_name': u'ip-192-168-39-58.qa.aws.gilbarco.com', u'public_ip': u'3.80.28.152', u'private_ip': u'192.168.39.58', u'id': u'i-0f1781aaa4b9a5eda', u'ebs_optimized': False, u'state': u'running', u'virtualization_type': u'hvm', u'root_device_name': u'/dev/xvda', u'ramdisk': None, u'block_device_mapping': {u'/dev/xvda': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0a5b3667cd810d820'}, u'/dev/xvdb': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0e64b16e12627b944'}}, u'key_name': u'i360-dev-aws-key', u'image_id': u'ami-04823d299323c9f7b', u'tenancy': u'default', u'groups': {u'sg-75e6a511': u'IadSgQaTomcatInt', u'sg-50e4a734': u'IadSgQaSshInt'}, u'public_dns_name': u'', u'state_code': 16, u'tags': {u'product-line': u'Common', u'bld_env': u'qa', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'server': u'core-report-qa-qa'}, u'placement': u'us-east-1b', u'ami_launch_index': u'0', u'dns_name': u'', u'region': u'us-east-1', u'launch_time': u'2020-01-31T16:47:55.000Z', u'instance_type': u't2.micro', u'architecture': u'x86_64', u'hypervisor': u'xen'}], '_ansible_item_result': True, u'instance_ids': [u'i-0f1781aaa4b9a5eda'], 'failed': False, u'tagged_instances': [], 'item': u'subnet-21ac5e56', u'invocation': {u'module_args': {u'kernel': None, u'image': u'ami-04823d299323c9f7b', u'monitoring': False, u'user_data': None, u'termination_protection': None, u'private_ip': None, u'spot_type': u'one-time', u'ec2_url': None, u'id': None, u'source_dest_check': True, u'aws_secret_key': u'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER', u'spot_wait_timeout': u'600', u'group': [u'IadSgQaSshInt', u'IadSgQaTomcatInt'], u'zone': None, u'exact_count': None, u'ebs_optimized': False, u'state': u'present', u'placement_group': None, u'spot_launch_group': None, u'key_name': u'i360-dev-aws-key', u'ramdisk': None, u'volumes': [{u'volume_size': u'16', u'delete_on_termination': True, u'volume_type': u'gp2', u'device_name': u'/dev/xvdb'}], u'count_tag': None, u'vpc_subnet_id': u'subnet-21ac5e56', u'instance_ids': None, u'tenancy': u'default', u'profile': None, u'assign_public_ip': True, u'spot_price': None, u'wait': True, u'count': 1, u'aws_access_key': u'AKIAICF4I4EPIEXMR4VQ', u'security_token': None, u'instance_profile_name': u'X-Ray-Access', u'region': u'us-east-1', u'network_interfaces': None, u'instance_initiated_shutdown_behavior': None, u'instance_type': u't2.micro', u'wait_timeout': u'300', u'keypair': u'i360-dev-aws-key', u'instance_tags': {u'product-line': u'Common', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'bld_env': u'qa', u'server': u'core-report-qa-qa'}, u'group_id': None, u'validate_certs': True}}, '_ansible_ignore_errors': None}) => {
1221 "changed": true,
1222 "invocation": {
1223 "module_args": {
1224 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
1225 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
1226 "ec2_url": null,
1227 "profile": null,
1228 "region": "us-east-1",
1229 "resource": "i-0f1781aaa4b9a5eda",
1230 "security_token": null,
1231 "state": "present",
1232 "tags": {
1233 "ec2-start-stop-weekly": "fri:0530;sun:0500-qa"
1234 },
1235 "validate_certs": true
1236 }
1237 },
1238 "item": {
1239 "changed": true,
1240 "failed": false,
1241 "instance_ids": [
1242 "i-0f1781aaa4b9a5eda"
1243 ],
1244 "instances": [
1245 {
1246 "ami_launch_index": "0",
1247 "architecture": "x86_64",
1248 "block_device_mapping": {
1249 "/dev/xvda": {
1250 "delete_on_termination": true,
1251 "status": "attached",
1252 "volume_id": "vol-0a5b3667cd810d820"
1253 },
1254 "/dev/xvdb": {
1255 "delete_on_termination": true,
1256 "status": "attached",
1257 "volume_id": "vol-0e64b16e12627b944"
1258 }
1259 },
1260 "dns_name": "",
1261 "ebs_optimized": false,
1262 "groups": {
1263 "sg-50e4a734": "IadSgQaSshInt",
1264 "sg-75e6a511": "IadSgQaTomcatInt"
1265 },
1266 "hypervisor": "xen",
1267 "id": "i-0f1781aaa4b9a5eda",
1268 "image_id": "ami-04823d299323c9f7b",
1269 "instance_type": "t2.micro",
1270 "kernel": null,
1271 "key_name": "i360-dev-aws-key",
1272 "launch_time": "2020-01-31T16:47:55.000Z",
1273 "placement": "us-east-1b",
1274 "private_dns_name": "ip-192-168-39-58.qa.aws.gilbarco.com",
1275 "private_ip": "192.168.39.58",
1276 "public_dns_name": "",
1277 "public_ip": "3.80.28.152",
1278 "ramdisk": null,
1279 "region": "us-east-1",
1280 "root_device_name": "/dev/xvda",
1281 "root_device_type": "ebs",
1282 "state": "running",
1283 "state_code": 16,
1284 "tags": {
1285 "Name": "core-report-qa",
1286 "app_name": "core-report-qa",
1287 "bld_env": "qa",
1288 "product-line": "Common",
1289 "server": "core-report-qa-qa"
1290 },
1291 "tenancy": "default",
1292 "virtualization_type": "hvm"
1293 }
1294 ],
1295 "invocation": {
1296 "module_args": {
1297 "assign_public_ip": true,
1298 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
1299 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
1300 "count": 1,
1301 "count_tag": null,
1302 "ebs_optimized": false,
1303 "ec2_url": null,
1304 "exact_count": null,
1305 "group": [
1306 "IadSgQaSshInt",
1307 "IadSgQaTomcatInt"
1308 ],
1309 "group_id": null,
1310 "id": null,
1311 "image": "ami-04823d299323c9f7b",
1312 "instance_ids": null,
1313 "instance_initiated_shutdown_behavior": null,
1314 "instance_profile_name": "X-Ray-Access",
1315 "instance_tags": {
1316 "Name": "core-report-qa",
1317 "app_name": "core-report-qa",
1318 "bld_env": "qa",
1319 "product-line": "Common",
1320 "server": "core-report-qa-qa"
1321 },
1322 "instance_type": "t2.micro",
1323 "kernel": null,
1324 "key_name": "i360-dev-aws-key",
1325 "keypair": "i360-dev-aws-key",
1326 "monitoring": false,
1327 "network_interfaces": null,
1328 "placement_group": null,
1329 "private_ip": null,
1330 "profile": null,
1331 "ramdisk": null,
1332 "region": "us-east-1",
1333 "security_token": null,
1334 "source_dest_check": true,
1335 "spot_launch_group": null,
1336 "spot_price": null,
1337 "spot_type": "one-time",
1338 "spot_wait_timeout": "600",
1339 "state": "present",
1340 "tenancy": "default",
1341 "termination_protection": null,
1342 "user_data": null,
1343 "validate_certs": true,
1344 "volumes": [
1345 {
1346 "delete_on_termination": true,
1347 "device_name": "/dev/xvdb",
1348 "volume_size": "16",
1349 "volume_type": "gp2"
1350 }
1351 ],
1352 "vpc_subnet_id": "subnet-21ac5e56",
1353 "wait": true,
1354 "wait_timeout": "300",
1355 "zone": null
1356 }
1357 },
1358 "item": "subnet-21ac5e56",
1359 "tagged_instances": []
1360 },
1361 "msg": "Tags {'ec2-start-stop-weekly': 'fri:0530;sun:0500-qa'} created for resource i-0f1781aaa4b9a5eda."
1362}
1363Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
1364
1365TASK [ec2_create : Ec2 Results] ************************************************
1366task path: /home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:76
1367Friday 31 January 2020 16:48:28 +0000 (0:00:00.638) 0:00:41.006 ********
1368ok: [localhost] => {
1369 "msg": [
1370 {
1371 "_ansible_ignore_errors": null,
1372 "_ansible_item_result": true,
1373 "_ansible_no_log": false,
1374 "_ansible_parsed": true,
1375 "changed": true,
1376 "failed": false,
1377 "instance_ids": [
1378 "i-0f1781aaa4b9a5eda"
1379 ],
1380 "instances": [
1381 {
1382 "ami_launch_index": "0",
1383 "architecture": "x86_64",
1384 "block_device_mapping": {
1385 "/dev/xvda": {
1386 "delete_on_termination": true,
1387 "status": "attached",
1388 "volume_id": "vol-0a5b3667cd810d820"
1389 },
1390 "/dev/xvdb": {
1391 "delete_on_termination": true,
1392 "status": "attached",
1393 "volume_id": "vol-0e64b16e12627b944"
1394 }
1395 },
1396 "dns_name": "",
1397 "ebs_optimized": false,
1398 "groups": {
1399 "sg-50e4a734": "IadSgQaSshInt",
1400 "sg-75e6a511": "IadSgQaTomcatInt"
1401 },
1402 "hypervisor": "xen",
1403 "id": "i-0f1781aaa4b9a5eda",
1404 "image_id": "ami-04823d299323c9f7b",
1405 "instance_type": "t2.micro",
1406 "kernel": null,
1407 "key_name": "i360-dev-aws-key",
1408 "launch_time": "2020-01-31T16:47:55.000Z",
1409 "placement": "us-east-1b",
1410 "private_dns_name": "ip-192-168-39-58.qa.aws.gilbarco.com",
1411 "private_ip": "192.168.39.58",
1412 "public_dns_name": "",
1413 "public_ip": "3.80.28.152",
1414 "ramdisk": null,
1415 "region": "us-east-1",
1416 "root_device_name": "/dev/xvda",
1417 "root_device_type": "ebs",
1418 "state": "running",
1419 "state_code": 16,
1420 "tags": {
1421 "Name": "core-report-qa",
1422 "app_name": "core-report-qa",
1423 "bld_env": "qa",
1424 "product-line": "Common",
1425 "server": "core-report-qa-qa"
1426 },
1427 "tenancy": "default",
1428 "virtualization_type": "hvm"
1429 }
1430 ],
1431 "invocation": {
1432 "module_args": {
1433 "assign_public_ip": true,
1434 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
1435 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
1436 "count": 1,
1437 "count_tag": null,
1438 "ebs_optimized": false,
1439 "ec2_url": null,
1440 "exact_count": null,
1441 "group": [
1442 "IadSgQaSshInt",
1443 "IadSgQaTomcatInt"
1444 ],
1445 "group_id": null,
1446 "id": null,
1447 "image": "ami-04823d299323c9f7b",
1448 "instance_ids": null,
1449 "instance_initiated_shutdown_behavior": null,
1450 "instance_profile_name": "X-Ray-Access",
1451 "instance_tags": {
1452 "Name": "core-report-qa",
1453 "app_name": "core-report-qa",
1454 "bld_env": "qa",
1455 "product-line": "Common",
1456 "server": "core-report-qa-qa"
1457 },
1458 "instance_type": "t2.micro",
1459 "kernel": null,
1460 "key_name": "i360-dev-aws-key",
1461 "keypair": "i360-dev-aws-key",
1462 "monitoring": false,
1463 "network_interfaces": null,
1464 "placement_group": null,
1465 "private_ip": null,
1466 "profile": null,
1467 "ramdisk": null,
1468 "region": "us-east-1",
1469 "security_token": null,
1470 "source_dest_check": true,
1471 "spot_launch_group": null,
1472 "spot_price": null,
1473 "spot_type": "one-time",
1474 "spot_wait_timeout": "600",
1475 "state": "present",
1476 "tenancy": "default",
1477 "termination_protection": null,
1478 "user_data": null,
1479 "validate_certs": true,
1480 "volumes": [
1481 {
1482 "delete_on_termination": true,
1483 "device_name": "/dev/xvdb",
1484 "volume_size": "16",
1485 "volume_type": "gp2"
1486 }
1487 ],
1488 "vpc_subnet_id": "subnet-21ac5e56",
1489 "wait": true,
1490 "wait_timeout": "300",
1491 "zone": null
1492 }
1493 },
1494 "item": "subnet-21ac5e56",
1495 "tagged_instances": []
1496 }
1497 ]
1498}
1499Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
1500
1501TASK [ec2_create : Retrieve all volumes for instance] **************************
1502task path: /home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:79
1503Friday 31 January 2020 16:48:28 +0000 (0:00:00.058) 0:00:41.064 ********
1504Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/basic.py
1505Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/ec2.py
1506Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/_text.py
1507Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/parsing/convert_bool.py
1508Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/parsing/__init__.py
1509Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/pycompat24.py
1510Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/six/__init__.py
1511Using module_utils file /home/jenkins/.local/lib/python2.7/site-packages/ansible/module_utils/cloud.py
1512Using module file /home/jenkins/.local/lib/python2.7/site-packages/ansible/modules/cloud/amazon/ec2_vol.py
1513<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jenkins
1514<127.0.0.1> EXEC /bin/sh -c 'echo ~jenkins && sleep 0'
1515<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489308.53-94931088076092 `" && echo ansible-tmp-1580489308.53-94931088076092="` echo /home/jenkins/.ansible/tmp/ansible-tmp-1580489308.53-94931088076092 `" ) && sleep 0'
1516<127.0.0.1> PUT /home/jenkins/.ansible/tmp/ansible-local-2845gG_U9/tmp2wqu7D TO /home/jenkins/.ansible/tmp/ansible-tmp-1580489308.53-94931088076092/ec2_vol.py
1517<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/jenkins/.ansible/tmp/ansible-tmp-1580489308.53-94931088076092/ /home/jenkins/.ansible/tmp/ansible-tmp-1580489308.53-94931088076092/ec2_vol.py && sleep 0'
1518<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /home/jenkins/.ansible/tmp/ansible-tmp-1580489308.53-94931088076092/ec2_vol.py && sleep 0'
1519<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/jenkins/.ansible/tmp/ansible-tmp-1580489308.53-94931088076092/ > /dev/null 2>&1 && sleep 0'
1520ok: [localhost] => (item={'_ansible_parsed': True, u'changed': True, '_ansible_no_log': False, u'instances': [{u'kernel': None, u'root_device_type': u'ebs', u'private_dns_name': u'ip-192-168-39-58.qa.aws.gilbarco.com', u'public_ip': u'3.80.28.152', u'private_ip': u'192.168.39.58', u'id': u'i-0f1781aaa4b9a5eda', u'ebs_optimized': False, u'state': u'running', u'virtualization_type': u'hvm', u'root_device_name': u'/dev/xvda', u'ramdisk': None, u'block_device_mapping': {u'/dev/xvda': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0a5b3667cd810d820'}, u'/dev/xvdb': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-0e64b16e12627b944'}}, u'key_name': u'i360-dev-aws-key', u'image_id': u'ami-04823d299323c9f7b', u'tenancy': u'default', u'groups': {u'sg-75e6a511': u'IadSgQaTomcatInt', u'sg-50e4a734': u'IadSgQaSshInt'}, u'public_dns_name': u'', u'state_code': 16, u'tags': {u'product-line': u'Common', u'bld_env': u'qa', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'server': u'core-report-qa-qa'}, u'placement': u'us-east-1b', u'ami_launch_index': u'0', u'dns_name': u'', u'region': u'us-east-1', u'launch_time': u'2020-01-31T16:47:55.000Z', u'instance_type': u't2.micro', u'architecture': u'x86_64', u'hypervisor': u'xen'}], '_ansible_item_result': True, u'instance_ids': [u'i-0f1781aaa4b9a5eda'], 'failed': False, u'tagged_instances': [], 'item': u'subnet-21ac5e56', u'invocation': {u'module_args': {u'kernel': None, u'image': u'ami-04823d299323c9f7b', u'monitoring': False, u'user_data': None, u'termination_protection': None, u'private_ip': None, u'spot_type': u'one-time', u'ec2_url': None, u'id': None, u'source_dest_check': True, u'aws_secret_key': u'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER', u'spot_wait_timeout': u'600', u'group': [u'IadSgQaSshInt', u'IadSgQaTomcatInt'], u'zone': None, u'exact_count': None, u'ebs_optimized': False, u'state': u'present', u'placement_group': None, u'spot_launch_group': None, u'key_name': u'i360-dev-aws-key', u'ramdisk': None, u'volumes': [{u'volume_size': u'16', u'delete_on_termination': True, u'volume_type': u'gp2', u'device_name': u'/dev/xvdb'}], u'count_tag': None, u'vpc_subnet_id': u'subnet-21ac5e56', u'instance_ids': None, u'tenancy': u'default', u'profile': None, u'assign_public_ip': True, u'spot_price': None, u'wait': True, u'count': 1, u'aws_access_key': u'AKIAICF4I4EPIEXMR4VQ', u'security_token': None, u'instance_profile_name': u'X-Ray-Access', u'region': u'us-east-1', u'network_interfaces': None, u'instance_initiated_shutdown_behavior': None, u'instance_type': u't2.micro', u'wait_timeout': u'300', u'keypair': u'i360-dev-aws-key', u'instance_tags': {u'product-line': u'Common', u'Name': u'core-report-qa', u'app_name': u'core-report-qa', u'bld_env': u'qa', u'server': u'core-report-qa-qa'}, u'group_id': None, u'validate_certs': True}}, '_ansible_ignore_errors': None}) => {
1521 "changed": false,
1522 "invocation": {
1523 "module_args": {
1524 "aws_access_key": null,
1525 "aws_secret_key": null,
1526 "delete_on_termination": false,
1527 "device_name": null,
1528 "ec2_url": null,
1529 "encrypted": false,
1530 "id": null,
1531 "instance": "i-0f1781aaa4b9a5eda",
1532 "iops": null,
1533 "kms_key_id": null,
1534 "name": null,
1535 "profile": null,
1536 "region": "us-east-1",
1537 "security_token": null,
1538 "snapshot": null,
1539 "state": "list",
1540 "tags": {},
1541 "validate_certs": true,
1542 "volume_size": null,
1543 "volume_type": "standard",
1544 "zone": null
1545 }
1546 },
1547 "item": {
1548 "changed": true,
1549 "failed": false,
1550 "instance_ids": [
1551 "i-0f1781aaa4b9a5eda"
1552 ],
1553 "instances": [
1554 {
1555 "ami_launch_index": "0",
1556 "architecture": "x86_64",
1557 "block_device_mapping": {
1558 "/dev/xvda": {
1559 "delete_on_termination": true,
1560 "status": "attached",
1561 "volume_id": "vol-0a5b3667cd810d820"
1562 },
1563 "/dev/xvdb": {
1564 "delete_on_termination": true,
1565 "status": "attached",
1566 "volume_id": "vol-0e64b16e12627b944"
1567 }
1568 },
1569 "dns_name": "",
1570 "ebs_optimized": false,
1571 "groups": {
1572 "sg-50e4a734": "IadSgQaSshInt",
1573 "sg-75e6a511": "IadSgQaTomcatInt"
1574 },
1575 "hypervisor": "xen",
1576 "id": "i-0f1781aaa4b9a5eda",
1577 "image_id": "ami-04823d299323c9f7b",
1578 "instance_type": "t2.micro",
1579 "kernel": null,
1580 "key_name": "i360-dev-aws-key",
1581 "launch_time": "2020-01-31T16:47:55.000Z",
1582 "placement": "us-east-1b",
1583 "private_dns_name": "ip-192-168-39-58.qa.aws.gilbarco.com",
1584 "private_ip": "192.168.39.58",
1585 "public_dns_name": "",
1586 "public_ip": "3.80.28.152",
1587 "ramdisk": null,
1588 "region": "us-east-1",
1589 "root_device_name": "/dev/xvda",
1590 "root_device_type": "ebs",
1591 "state": "running",
1592 "state_code": 16,
1593 "tags": {
1594 "Name": "core-report-qa",
1595 "app_name": "core-report-qa",
1596 "bld_env": "qa",
1597 "product-line": "Common",
1598 "server": "core-report-qa-qa"
1599 },
1600 "tenancy": "default",
1601 "virtualization_type": "hvm"
1602 }
1603 ],
1604 "invocation": {
1605 "module_args": {
1606 "assign_public_ip": true,
1607 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
1608 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
1609 "count": 1,
1610 "count_tag": null,
1611 "ebs_optimized": false,
1612 "ec2_url": null,
1613 "exact_count": null,
1614 "group": [
1615 "IadSgQaSshInt",
1616 "IadSgQaTomcatInt"
1617 ],
1618 "group_id": null,
1619 "id": null,
1620 "image": "ami-04823d299323c9f7b",
1621 "instance_ids": null,
1622 "instance_initiated_shutdown_behavior": null,
1623 "instance_profile_name": "X-Ray-Access",
1624 "instance_tags": {
1625 "Name": "core-report-qa",
1626 "app_name": "core-report-qa",
1627 "bld_env": "qa",
1628 "product-line": "Common",
1629 "server": "core-report-qa-qa"
1630 },
1631 "instance_type": "t2.micro",
1632 "kernel": null,
1633 "key_name": "i360-dev-aws-key",
1634 "keypair": "i360-dev-aws-key",
1635 "monitoring": false,
1636 "network_interfaces": null,
1637 "placement_group": null,
1638 "private_ip": null,
1639 "profile": null,
1640 "ramdisk": null,
1641 "region": "us-east-1",
1642 "security_token": null,
1643 "source_dest_check": true,
1644 "spot_launch_group": null,
1645 "spot_price": null,
1646 "spot_type": "one-time",
1647 "spot_wait_timeout": "600",
1648 "state": "present",
1649 "tenancy": "default",
1650 "termination_protection": null,
1651 "user_data": null,
1652 "validate_certs": true,
1653 "volumes": [
1654 {
1655 "delete_on_termination": true,
1656 "device_name": "/dev/xvdb",
1657 "volume_size": "16",
1658 "volume_type": "gp2"
1659 }
1660 ],
1661 "vpc_subnet_id": "subnet-21ac5e56",
1662 "wait": true,
1663 "wait_timeout": "300",
1664 "zone": null
1665 }
1666 },
1667 "item": "subnet-21ac5e56",
1668 "tagged_instances": []
1669 },
1670 "volumes": []
1671}
1672Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
1673
1674TASK [ec2_create : All volumes] ************************************************
1675task path: /home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:87
1676Friday 31 January 2020 16:48:28 +0000 (0:00:00.506) 0:00:41.570 ********
1677ok: [localhost] => {
1678 "msg": {
1679 "changed": false,
1680 "msg": "All items completed",
1681 "results": [
1682 {
1683 "_ansible_ignore_errors": null,
1684 "_ansible_item_result": true,
1685 "_ansible_no_log": false,
1686 "_ansible_parsed": true,
1687 "changed": false,
1688 "failed": false,
1689 "invocation": {
1690 "module_args": {
1691 "aws_access_key": null,
1692 "aws_secret_key": null,
1693 "delete_on_termination": false,
1694 "device_name": null,
1695 "ec2_url": null,
1696 "encrypted": false,
1697 "id": null,
1698 "instance": "i-0f1781aaa4b9a5eda",
1699 "iops": null,
1700 "kms_key_id": null,
1701 "name": null,
1702 "profile": null,
1703 "region": "us-east-1",
1704 "security_token": null,
1705 "snapshot": null,
1706 "state": "list",
1707 "tags": {},
1708 "validate_certs": true,
1709 "volume_size": null,
1710 "volume_type": "standard",
1711 "zone": null
1712 }
1713 },
1714 "item": {
1715 "_ansible_ignore_errors": null,
1716 "_ansible_item_result": true,
1717 "_ansible_no_log": false,
1718 "_ansible_parsed": true,
1719 "changed": true,
1720 "failed": false,
1721 "instance_ids": [
1722 "i-0f1781aaa4b9a5eda"
1723 ],
1724 "instances": [
1725 {
1726 "ami_launch_index": "0",
1727 "architecture": "x86_64",
1728 "block_device_mapping": {
1729 "/dev/xvda": {
1730 "delete_on_termination": true,
1731 "status": "attached",
1732 "volume_id": "vol-0a5b3667cd810d820"
1733 },
1734 "/dev/xvdb": {
1735 "delete_on_termination": true,
1736 "status": "attached",
1737 "volume_id": "vol-0e64b16e12627b944"
1738 }
1739 },
1740 "dns_name": "",
1741 "ebs_optimized": false,
1742 "groups": {
1743 "sg-50e4a734": "IadSgQaSshInt",
1744 "sg-75e6a511": "IadSgQaTomcatInt"
1745 },
1746 "hypervisor": "xen",
1747 "id": "i-0f1781aaa4b9a5eda",
1748 "image_id": "ami-04823d299323c9f7b",
1749 "instance_type": "t2.micro",
1750 "kernel": null,
1751 "key_name": "i360-dev-aws-key",
1752 "launch_time": "2020-01-31T16:47:55.000Z",
1753 "placement": "us-east-1b",
1754 "private_dns_name": "ip-192-168-39-58.qa.aws.gilbarco.com",
1755 "private_ip": "192.168.39.58",
1756 "public_dns_name": "",
1757 "public_ip": "3.80.28.152",
1758 "ramdisk": null,
1759 "region": "us-east-1",
1760 "root_device_name": "/dev/xvda",
1761 "root_device_type": "ebs",
1762 "state": "running",
1763 "state_code": 16,
1764 "tags": {
1765 "Name": "core-report-qa",
1766 "app_name": "core-report-qa",
1767 "bld_env": "qa",
1768 "product-line": "Common",
1769 "server": "core-report-qa-qa"
1770 },
1771 "tenancy": "default",
1772 "virtualization_type": "hvm"
1773 }
1774 ],
1775 "invocation": {
1776 "module_args": {
1777 "assign_public_ip": true,
1778 "aws_access_key": "AKIAICF4I4EPIEXMR4VQ",
1779 "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
1780 "count": 1,
1781 "count_tag": null,
1782 "ebs_optimized": false,
1783 "ec2_url": null,
1784 "exact_count": null,
1785 "group": [
1786 "IadSgQaSshInt",
1787 "IadSgQaTomcatInt"
1788 ],
1789 "group_id": null,
1790 "id": null,
1791 "image": "ami-04823d299323c9f7b",
1792 "instance_ids": null,
1793 "instance_initiated_shutdown_behavior": null,
1794 "instance_profile_name": "X-Ray-Access",
1795 "instance_tags": {
1796 "Name": "core-report-qa",
1797 "app_name": "core-report-qa",
1798 "bld_env": "qa",
1799 "product-line": "Common",
1800 "server": "core-report-qa-qa"
1801 },
1802 "instance_type": "t2.micro",
1803 "kernel": null,
1804 "key_name": "i360-dev-aws-key",
1805 "keypair": "i360-dev-aws-key",
1806 "monitoring": false,
1807 "network_interfaces": null,
1808 "placement_group": null,
1809 "private_ip": null,
1810 "profile": null,
1811 "ramdisk": null,
1812 "region": "us-east-1",
1813 "security_token": null,
1814 "source_dest_check": true,
1815 "spot_launch_group": null,
1816 "spot_price": null,
1817 "spot_type": "one-time",
1818 "spot_wait_timeout": "600",
1819 "state": "present",
1820 "tenancy": "default",
1821 "termination_protection": null,
1822 "user_data": null,
1823 "validate_certs": true,
1824 "volumes": [
1825 {
1826 "delete_on_termination": true,
1827 "device_name": "/dev/xvdb",
1828 "volume_size": "16",
1829 "volume_type": "gp2"
1830 }
1831 ],
1832 "vpc_subnet_id": "subnet-21ac5e56",
1833 "wait": true,
1834 "wait_timeout": "300",
1835 "zone": null
1836 }
1837 },
1838 "item": "subnet-21ac5e56",
1839 "tagged_instances": []
1840 },
1841 "volumes": []
1842 }
1843 ]
1844 }
1845}
1846Read vars_file '/opt/ansible/vault/{{ lookup('env','ENV') }}.yml'
1847
1848TASK [ec2_create : Ensure all volumes are tagged] ******************************
1849task path: /home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:105
1850Friday 31 January 2020 16:48:28 +0000 (0:00:00.038) 0:00:41.609 ********
1851fatal: [localhost]: FAILED! => {
1852 "msg": "The task includes an option with an undefined variable. The error was: 'list object' has no attribute 'volume_id'\n\nThe error appears to have been in '/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml': line 105, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n# register: ebs_volume\n- name: Ensure all volumes are tagged\n ^ here\n"
1853}
1854 to retry, use: --limit @/home/jenkins/workspace/Core_Report/core-report-sb.retry
1855
1856PLAY RECAP *********************************************************************
1857localhost : ok=12 changed=4 unreachable=0 failed=1
1858
1859Friday 31 January 2020 16:48:28 +0000 (0:00:00.022) 0:00:41.632 ********
1860===============================================================================
1861ec2_create : Launch Instance(s) ---------------------------------------- 33.23s
1862/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:2 ---------
1863Gathering Facts --------------------------------------------------------- 5.09s
1864/home/jenkins/workspace/Core_Report/core-report-sb.yml:3 ----------------------
1865ec2_create : Update Instance Name Tag(s) -------------------------------- 0.78s
1866/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:44 --------
1867ec2_create : Scheduler Instance Name Tag(s) in Qa ---------------------- 0.64s
1868/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:65 --------
1869find_gvr_ami : Find latest GVR Linux Image ------------------------------ 0.51s
1870/home/jenkins/workspace/Core_Report/roles/find_gvr_ami/tasks/main.yml:4 -------
1871ec2_create : Retrieve all volumes for instance -------------------------- 0.51s
1872/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:79 --------
1873ec2_create : Instance Ids ----------------------------------------------- 0.32s
1874/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:23 --------
1875ec2_create : Add hosts group temporary inventory group with pem path ---- 0.16s
1876/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:27 --------
1877find_gvr_ami : Debug hostvars ------------------------------------------- 0.08s
1878/home/jenkins/workspace/Core_Report/roles/find_gvr_ami/tasks/main.yml:22 ------
1879ec2_create : Ec2 Results ------------------------------------------------ 0.06s
1880/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:76 --------
1881ec2_create : Scheduler Instance Name Tag(s) in dev --------------------- 0.04s
1882/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:54 --------
1883ec2_create : All volumes ------------------------------------------------ 0.04s
1884/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:87 --------
1885ec2_create : Add hosts group temporary inventory group without pem path --- 0.04s
1886/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:36 --------
1887find_gvr_ami : Results -------------------------------------------------- 0.03s
1888/home/jenkins/workspace/Core_Report/roles/find_gvr_ami/tasks/main.yml:19 ------
1889ec2_create : Ensure all volumes are tagged ------------------------------ 0.02s
1890/home/jenkins/workspace/Core_Report/roles/ec2_create/tasks/main.yml:105 -------
1891FATAL: command execution failed
1892hudson.AbortException: Ansible playbook execution failed
1893 at org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:262)
1894 at org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:232)
1895 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
1896 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
1897 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
1898 at hudson.model.Build$BuildExecution.build(Build.java:206)
1899 at hudson.model.Build$BuildExecution.doRun(Build.java:163)
1900 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
1901 at hudson.model.Run.execute(Run.java:1815)
1902 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
1903 at hudson.model.ResourceController.execute(ResourceController.java:97)
1904 at hudson.model.Executor.run(Executor.java:429)
1905Set build name.
1906New build name is 'qa-#116'
1907ERROR: Ansible playbook execution failed
1908Notifying upstream projects of job completion
1909[parameterized-trigger] Properties file /home/jenkins/workspace/Core_Report/id.ini did not exist.
1910Triggering a new build of EC2_delete
1911Regular expression run condition: Expression=[i-.*], Label=[]
1912Run condition [Regular expression match] preventing perform for step [Builder to mark whether executed]
1913Finished: FAILURE