Skip to content

Commit

Permalink
mvp-1-no (EticaAI/aguia-pescadora#26): refactoring; explicitamente re…
Browse files Browse the repository at this point in the history
…quer SO Debian ou Ubuntu para alertar usuarios que nao lerem documentação
  • Loading branch information
fititnt committed Jul 3, 2019
1 parent b2c9df9 commit 75292f3
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 23 deletions.
22 changes: 3 additions & 19 deletions 1-node-tsuru-autossl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,10 @@
# ansible-playbook 1-node-tsuru-autossl.yml -e paas_host=example.com
# ansible-playbook 1-node-tsuru-autossl.yml -e paas_host=aguia-pescadora-foxtrot.etica.ai

- name: tldr tsuru client? docker? docker-machine?
- name: "localhost: tsuru client? docker? docker-machine?"
hosts: localhost
tasks:
- name: tsuru client? https://tsuru-client.readthedocs.io/en/latest/installing.html
shell: tsuru --version
register: result
changed_when: false
ignore_errors: false

- name: docker? https://docs.docker.com/install/
shell: docker --version
register: result2
changed_when: false
ignore_errors: false

- name: docker-machine? https://docs.docker.com/machine/install-machine/
shell: docker-machine version
register: result3
changed_when: false
ignore_errors: false
roles:
- can-localhost-setup-remote-tsuru

- name: "Águia Pescadora PaaS Tudo-Em-Um-Nó (Tsuru PaaS, Minio, AutoSSL via OpenResty)"
hosts: all
Expand Down
21 changes: 21 additions & 0 deletions roles/can-localhost-setup-remote-tsuru/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---



- name: tsuru client? https://tsuru-client.readthedocs.io/en/latest/installing.html
shell: tsuru --version
register: result
changed_when: false
ignore_errors: false

- name: docker? https://docs.docker.com/install/
shell: docker --version
register: result2
changed_when: false
ignore_errors: false

- name: docker-machine? https://docs.docker.com/machine/install-machine/
shell: docker-machine version
register: result3
changed_when: false
ignore_errors: false
16 changes: 12 additions & 4 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
---
# tasks file for common

- fail:
msg: Ubuntu? Debian? Fail. Not fully tested on other OSs.
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
#- name: debug ansible_hostname
# debug:
# msg: debug {{ ansible_facts['date_time']['tz'] }}

## Por segurança talvez a pessoa pode não ter lido manual e não saber que não
## testamos nos demais sistemas operacionais.
- name: Ubuntu? Debian?
fail:
msg: fail
when: ansible_distribution != 'Debian' and ansible_distribution != 'Ubuntu'

- name: sudo apt-get install aptitude
apt:
name: aptitude
state: present
# when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'

- name: sudo hostnamectl set-hostname {{ inventory_hostname }}
hostname:
name: "{{ inventory_hostname }}"
when: inventory_hostname_short != ansible_hostname

- name: sudo timedatectl set-timezone UTC
timezone:
name: UTC
when: ansible_facts['date_time']['tz'] != 'UTC'

# sudo timedatectl set-timezone UTC

Expand Down

0 comments on commit 75292f3

Please sign in to comment.