diff --git a/.ansible-lint b/.ansible-lint index e5c78c9..fa403d7 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -8,3 +8,4 @@ exclude_paths: - ./roles/ - ./.github/ - ./requirements.yml + - ./molecule/ diff --git a/.yamllint b/.yamllint index 843da50..058f152 100644 --- a/.yamllint +++ b/.yamllint @@ -5,6 +5,8 @@ ignore: | meta/ roles/ .venv/ + group_vars/staging/vault.yml + group_vars/production/vault.yml rules: braces: diff --git a/ansible.cfg b/ansible.cfg index fa1b88c..58a1b7f 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -20,10 +20,10 @@ callback_whitelist = profile_tasks inventory_ignore_extensions = secrets.py, .pyc, .cfg, .crt, .ini timeout = 30 # define o arquivo acesso ao segredo do vault -vault_password_file = /tmp/vault_password_file +#vault_password_file = /tmp/vault_password_file # Descomente para usar o inventário exemplo -#inventory = inventory/hosts.example +inventory = hosts.example [inventory] # Falha quando o parse do inventário não passar (Ansible 2.4+) diff --git a/group_vars/production/vars.yml b/group_vars/production/vars.yml index 8cbe700..5bdb95d 100644 --- a/group_vars/production/vars.yml +++ b/group_vars/production/vars.yml @@ -11,7 +11,7 @@ apps_config: # CLOUDAMQP_URL: "{{ cloudamqp_url }}" # CLOUDAMQP_APIKEY: "{{ cloudamqp_apikey }}" CITY_COUNCIL_WEBSERVICE: "https://www.transparencia.feiradesantana.ba.leg.br/" - CITY_COUNCIL_WEBSERVICE_ENDPOINT: "http://transparencia.feiradesantana.ba.leg.br/webservice" + CITY_COUNCIL_WEBSERVICE_ENDPOINT: "http://transparencia.feiradesantana.ba.leg.br/webservice" DJANGO_ALLOWED_HOSTS: ".mq.dadosabertosdefeira.com.br" DJANGO_CONFIGURATION: "Prod" DJANGO_SETTINGS_MODULE: "web.settings" @@ -23,7 +23,6 @@ apps_config: SENTRY_ENVIRONMENT: "Prod" SPIDERMON_SENTRY_ENVIRONMENT_TYPE: "Prod" TIKA_CLIENT_ONLY: "1" - # NEWRELIC INFRA nrinfragent_integrations: diff --git a/playbook.yml b/playbook.yml index 6f4ba73..e911dff 100644 --- a/playbook.yml +++ b/playbook.yml @@ -3,7 +3,7 @@ become: yes pre_tasks: - name: Atualizando apt cache - apt: + ansible.builtin.apt: update_cache: yes cache_valid_time: 600 when: ansible_os_family == 'Debian' @@ -14,7 +14,7 @@ - iac-role-services tasks: - name: copying log files config - copy: + ansible.builtin.copy: src: config_files/logging.yml dest: /etc/newrelic-infra/logging.d mode: 0644 @@ -28,16 +28,16 @@ config: "{{ apps_config }}" when: apps_config is defined - #ignore_errors: yes + # ignore_errors: yes - name: environment configuration vault dokku_config: app: "{{ app }}" config: "{{ apps_config_vault }}" when: apps_config_vault is defined - #ignore_errors: yes + # ignore_errors: yes - name: Add dokku_service network to mariaquiteria - command: "dokku network:set {{ app }} attach-post-create dokku_services" + ansible.builtin.command: "dokku network:set {{ app }} attach-post-create dokku_services" args: creates: "/tmp/network_dokku_services_mariaquiteria_{{ env }}" changed_when: "'molecule-idempotence-notest' not in ansible_skip_tags" diff --git a/requirements.txt b/requirements.txt index 8a123f5..9b50111 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,8 @@ -ansible==2.10.5 -ansible-lint==4.3.7 -docker==4.4.1 -molecule==3.2.2 -molecule-docker==0.2.4 -pytest==6.2.1 +ansible==5.3.0 +docker==4.4.4 pytest-testinfra==6.1.0 -testinfra==6.0.0 +molecule==3.6.1 +molecule-docker==1.1.0 +ansible-lint==6.0.1 yamllint==1.25.0 +ansible-core==2.12.2 \ No newline at end of file