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 02f3b0ad88681c70a0b3d853fa046b060d636a65..12c6ff1637fda0e0082a4a2d514c512c70923675 100644
(file)
--- a/
roles/common/tasks/main.yml
+++ b/
roles/common/tasks/main.yml
@@
-1,28
+1,40
@@
---
---
+- 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
file:
state: directory
- name: Create local asset directory
when: ASSET_PATH is defined
file:
state: directory
- path:
{{ ASSET_PATH }}
+ path:
"{{ ASSET_PATH }}"
mode: "0755"
owner: root
group: root
mode: "0755"
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,10
+58,10
@@
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
copy:
dest: /etc/ansible/facts.d/{{ item }}.fact
- src:
{{ item }}.fact
+ src:
"{{ item }}.fact"
mode: "0755"
owner: root
group: root
mode: "0755"
owner: root
group: root
@@
-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