Skip to content

Instantly share code, notes, and snippets.

View sbeliakou's full-sized avatar

Siarhei Beliakou sbeliakou

View GitHub Profile

Ansible v1.8

$ pip install ansible==1.8
Requirement already satisfied: ansible==1.8 in /usr/local/lib/python2.7/site-packages
Requirement already satisfied: paramiko in /usr/local/lib/python2.7/site-packages (from ansible==1.8)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/site-packages (from ansible==1.8)
Requirement already satisfied: pycrypto>=2.6 in /Library/Python/2.7/site-packages (from ansible==1.8)
Requirement already satisfied: PyYAML in /usr/local/lib/python2.7/site-packages (from ansible==1.8)
Requirement already satisfied: jinja2 in /usr/local/lib/python2.7/site-packages (from ansible==1.8)
Requirement already satisfied: cryptography>=1.1 in /usr/local/lib/python2.7/site-packages (from paramiko->ansible==1.8)

Testing playbook:

test.yml

- hosts: localhost
  connection: local

  tasks:
  - timetest:

Testing playbook:

test.yml

- hosts: localhost
  connection: local

  tasks:
  - timetest:

Testing playbook:

Dir tree

.
|-- lib
|   `-- timetest.py
`-- test.yml

Testing playbook:

Dir tree

.
|-- lib
|   `-- timetest.py
`-- test.yml
# installation: pip install docker-compose
# filename: docker-compose.yml
# run: cd ./; docker-compose up -d
# stop: cd ./; docker-compose stop
version: '2'
services:
jenkins:
restart: always
Using /Users/sbeliakou/Desktop/mntlab/cm/vagrant/tests/ansible.cfg as config file
PLAYBOOK: test.yml *************************************************************
1 plays in ./test.yml
PLAY [notverified] *************************************************************
TASK [setup] *******************************************************************
ok: [EPBYMINW2470.minsk.epam.com]
ok: [EPBYMINW2467.minsk.epam.com]
Using /Users/sbeliakou/Desktop/mntlab/cm/vagrant/tests/ansible.cfg as config file
PLAYBOOK: test.yml *************************************************************
1 plays in ./test.yml
PLAY [notverified] *************************************************************
TASK [setup] *******************************************************************
ok: [EPBYMINW2470.minsk.epam.com]
ok: [EPBYMINW2467.minsk.epam.com]
PLAY [test] ********************************************************************
TASK [setup] *******************************************************************
ok: [EPBYMINW3093.minsk.epam.com]
TASK [vagrant up] **************************************************************
changed: [EPBYMINW3093.minsk.epam.com]
stdout: /home/student/workspace/vagrant

Using /Users/sbeliakou/workspace/DigitalInnovations/phoenix-project/AWSIdentityManagement/playbook/ansible.cfg as config file

Playbook: ./awsServiceUserManagement.yml

1 plays in ./awsServiceUserManagement.yml

Play: Manage Service Users and their Policies

TASK: Identity Account ID

TASK: Output a Remapped List of Service Users

TASK: Ensure Directory for CFN Templates exists

TASK: Generate CFN Stacks for System Users (1 Stack per AWS Account)

changed host item result err