---
-- include: volumes.yml
-
-- name: Create local asset directory
- when: ASSET_PATH is defined
- file:
- state: directory
- path: {{ ASSET_PATH }}
- mode: "0755"
- owner: root
- group: root
+- name: Uninstall outdated python packages
+ with_items:
+ - aws-cli
+ - python27-botocore
+ - python27-boto
+ yum:
+ package: "{{ item }}"
+ state: absent
-- name: PIP prerequisites
+- name: Install new python packages
with_items:
+ - awscli
- boto
- boto3
- - httplib2
- - requests
pip:
name: "{{ item }}"
state: latest
- name: Common packages
with_items:
- - aws-cli
- cowsay
- figlet
- ipsec-tools
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
+ src: "{{ item }}.fact"
mode: "0755"
owner: root
group: root
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
command: /usr/sbin/update-motd
- name: profile stuff
- copy:
+ template:
dest: /etc/profile.d/awsible.sh
- src: awsible.sh
+ src: awsible.sh.j2
mode: "0644"
owner: root
group: root