projects
/
awsible
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix openvpn things
[awsible]
/
roles
/
common
/
tasks
/
main.yml
diff --git
a/roles/common/tasks/main.yml
b/roles/common/tasks/main.yml
index b92b5174c4aec46dd83c560563221b396dbacd2f..12c6ff1637fda0e0082a4a2d514c512c70923675 100644
(file)
--- a/
roles/common/tasks/main.yml
+++ b/
roles/common/tasks/main.yml
@@
-1,5
+1,10
@@
---
---
+- name: bootstrap /data
+ stat:
+ path: /data
+ register: datadir
- include: volumes.yml
- include: volumes.yml
+ when: not datadir.stat.exists
- name: Create local asset directory
when: ASSET_PATH is defined
- name: Create local asset directory
when: ASSET_PATH is defined
@@
-10,19
+15,26
@@
owner: root
group: root
owner: root
group: root
-- name:
PIP prerequisit
es
+- name:
Uninstall outdated python packag
es
with_items:
with_items:
+ - aws-cli
+ - python27-botocore
+ - python27-boto
+ yum:
+ package: "{{ item }}"
+ state: absent
+
+- name: Install new python packages
+ with_items:
+ - awscli
- boto
- boto3
- boto
- boto3
- - httplib2
- - requests
pip:
name: "{{ item }}"
pip:
name: "{{ item }}"
- state:
lates
t
+ state:
presen
t
- name: Common packages
with_items:
- name: Common packages
with_items:
- - aws-cli
- cowsay
- figlet
- ipsec-tools
- cowsay
- figlet
- ipsec-tools
@@
-46,7
+58,7
@@
group: root
- name: Install any facts.
group: root
- name: Install any facts.
- with_items: "{{ fact_scripts|default(
None
) }}"
+ with_items: "{{ fact_scripts|default(
[]
) }}"
copy:
dest: /etc/ansible/facts.d/{{ item }}.fact
src: "{{ item }}.fact"
copy:
dest: /etc/ansible/facts.d/{{ item }}.fact
src: "{{ item }}.fact"
@@
-67,6
+79,7
@@
state: list
region: "{{ ansible_ec2_placement_region }}"
resource: "{{ ansible_ec2_instance_id }}"
state: list
region: "{{ ansible_ec2_placement_region }}"
resource: "{{ ansible_ec2_instance_id }}"
+ register: my_tags
- name: Name instance from ID and ASG module
when: my_tags['tags']['aws:autoscaling:groupName'] is defined
- name: Name instance from ID and ASG module
when: my_tags['tags']['aws:autoscaling:groupName'] is defined