This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent { | |
docker { | |
image 'vireshdoshi/jen-build-node-app-aws:latest' | |
} | |
} | |
stages { | |
stage('Checkout and Build') { | |
steps { | |
sh 'git clone https://github.com/VireshDoshi/node-app .' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "access_key" {} | |
variable "secret_key" {} | |
provider "aws" { | |
access_key = "${var.access_key}" | |
secret_key = "${var.secret_key}" | |
region = "us-east-1" | |
} | |
data "aws_ami" "node_app_ami" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
tasks: | |
- name: Install the gpg key for nodejs LTS | |
become: true | |
apt_key: | |
url: "http://deb.nodesource.com/gpgkey/nodesource.gpg.key" | |
state: present |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"aws_access_key": "", | |
"aws_secret_key": "" | |
}, | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"execute_command": "echo 'ubuntu' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform_project/ | |
--> autoscaling_groups/ | |
--> variables.tf | |
--> website-asg.tf | |
--> launch_configurations/ | |
--> variables.tf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[vdo023@localhost ASOS_BDD_WebTester]$ cat ./test_selenium_grid.py | |
import unittest | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.support.ui import Select | |
class PythonOrgSearch(unittest.TestCase): | |
def setUp(self): | |
self.driver = webdriver.Remote( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[vdo023@localhost modify_list]$ ansible-playbook -i "localhost," ./modify_list-playbook.yml | |
PLAY [localhost] ********************************************************************************************************************************** | |
TASK [modify the list values by appending to the end with _changed] ******************************************************************************* | |
ok: [localhost] => { | |
"msg": "before value: [u'listitem_1', u'listitem_2'] after value: [u'listitem_1_changed', u'listitem_2_changed']" | |
} | |
TASK [modify the list values by appending to the end with .changed] ******************************************************************************* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[vdo023@localhost list_dicts]$ ansible-playbook -i "localhost," ./list_dicts-playbook.yml | |
PLAY [Test playbook for checking dictionaries] **************************************************************************************************** | |
TASK [Gathering Facts] **************************************************************************************************************************** | |
ok: [localhost] | |
TASK [Accessing direct dictionary] **************************************************************************************************************** | |
ok: [localhost] => { | |
"msg": "hostname is test and ip is 127.0.0.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[vdo023@localhost selectattr]$ ansible-playbook -i "localhost," ./selectattr-playbook.yml | |
PLAY [localhost] ********************************************************************************************************************************** | |
TASK [extract the emails for users without a password] ******************************************************************************************** | |
ok: [localhost] | |
TASK [debug message] ****************************************************************************************************************************** | |
ok: [localhost] => ([email protected]) => { | |
"changed": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[vdo023@localhost jinja2-map]$ ansible-playbook -i "localhost," ./j2-map-playbook.yml | |
PLAY [localhost] ********************************************************************************************************************************** | |
TASK [establish the first name from the mps dictionary] ******************************************************************************************* | |
ok: [localhost] => { | |
"msg": [ | |
"Tony", | |
"Theresa", | |
"Nigel" |