-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add anisble-galaxy configuration with timezone setup in common
ref: - https://docs.ansible.com/galaxy.html - https://servercheck.in/blog/using-ansible-galaxy - https://github.com/yatesr/ansible-timezone
- Loading branch information
Saurabh Kumar
committed
Jul 18, 2015
1 parent
fa385d9
commit 2ee38e3
Showing
7 changed files
with
28 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
--- | ||
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" | ||
|
||
# Run the role/playbook again, checking to make sure it's idempotent. | ||
- > | ||
ansible-playbook -i tests/inventory tests/test.yml --connection=local --sudo | ||
| grep -q 'changed=0.*failed=0' | ||
&& (echo 'Idempotence test: pass' && exit 0) | ||
|| (echo 'Idempotence test: fail' && exit 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
- hosts: all | ||
sudo: true | ||
gather_facts: false | ||
|
||
roles: | ||
- common |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
dependencies: | ||
- { role: yatesr.timezone, timezone: Asia/Kolkata } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |