Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add anisble-galaxy configuration with timezone setup in common #9

Merged
merged 1 commit into from
Jul 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
language: python
python: "2.7"

before_install:
# Make sure everything's up to date.
- sudo apt-get update -qq
sudo: true

install:
# Install Ansible.
- pip install ansible
- sudo pip install ansible
- sudo ansible-galaxy install -r requirements.yml

script:
# Check the role/playbook's syntax.
- ansible-playbook -i hosts playbook.yml --syntax-check

# Run the role/playbook with ansible-playbook.
- "ansible-playbook -i hosts playbook.yml --connection=local --sudo -vvvv"
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@ Make sure you have [vagrant] and virtualbox installed, then run:

```shell
sudo pip install ansible
sudo ansible-galaxy install -r requirements.yml
vagrant up
```

Login to the new machine with:
You can login to the virtal machine with `vagrant ssh`. If you want to run any changes you have done in the ansible scripts, use `vargant provision` to run them against the virtual machine.

Use `vagrant destroy` to kill the virtual machine.


### Further Reading

1. https://docs.ansible.com/galaxy.html

```shell
vagrant ssh
```

[vagrant]: https://www.vagrantup.com/downloads.html

Expand Down
1 change: 0 additions & 1 deletion playbook.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
- hosts: all
sudo: true
gather_facts: false

roles:
- common
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

4 changes: 4 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://docs.ansible.com/galaxy.html#advanced-control-over-role-requirements-files

# https://github.com/yatesr/ansible-timezone
- src: yatesr.timezone
3 changes: 3 additions & 0 deletions roles/common/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
dependencies:
- { role: yatesr.timezone, timezone: Asia/Kolkata }
2 changes: 1 addition & 1 deletion roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
# roles/common/tasks/main.yml
- name: set system locale
- name: Set system locale
command: update-locale LC_ALL={{ lc_all }} LANG={{ lang }} LC_CTYPE={{ lc_ctype }} LC_COLLATE={{ lc_collate }}