Checking for all file dependencies so tasks can be re-run
This commit is contained in:
@@ -46,29 +46,49 @@
|
||||
- name: Set git email
|
||||
shell: git config --global user.email "jacob.wimer@gmail.com"
|
||||
|
||||
- name: Is docker installed
|
||||
shell: which docker
|
||||
resgister: docker_installed
|
||||
|
||||
- name: Get docker
|
||||
shell: curl -sSL https://get.docker.com/ | sh
|
||||
when: docker_install is none
|
||||
|
||||
- name: Get docker compose
|
||||
shell: curl -L https://github.com/docker/compose/releases/download/1.5.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
|
||||
when: docker_install is none
|
||||
|
||||
- name: Link docker compose
|
||||
shell: chmod +x /usr/local/bin/docker-compose
|
||||
when: docker_install is none
|
||||
|
||||
- name: Set timezone to NewYork
|
||||
shell: timedatectl set-timezone America/New_York
|
||||
|
||||
- name: Is heroku installed
|
||||
shell: which heroku
|
||||
resgister: heroku_installed
|
||||
|
||||
- name: Install heroku toolbelt
|
||||
shell: wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
|
||||
when: heroku_installed is none
|
||||
|
||||
- name: Does the update script exist
|
||||
stat: path=/etc/cron.daily/update.sh
|
||||
register: update_script
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Create update script
|
||||
shell: touch /etc/cron.daily/update.sh
|
||||
when: update_script|failed
|
||||
|
||||
- name: Set update script as executable
|
||||
shell: chmod +x /etc/cron.daily/update.sh
|
||||
when: update_script|failed
|
||||
|
||||
- name: Add update line to update script
|
||||
shell: echo apt-get update && apt-get upgrade -y && apt-get clean && apt-get autoclean && apt-get autoremove -y && apt-get update >> /etc/cron.daily/update.sh
|
||||
when: update_script|failed
|
||||
|
||||
- name: test for swap partition
|
||||
shell: swapon -s | grep -E "^/"
|
||||
|
||||
Reference in New Issue
Block a user