Browse Source

infrastructure: fix yamllint errors

keep-around/29364a9feb7c22d700f0e5ac8a4e2a2e5789e0f4
singuliere 3 years ago
parent
commit
a24eed12bc
No known key found for this signature in database GPG Key ID: 900857755EF189C2
  1. 2
      .yamllint
  2. 40
      molecule/infrastructure/create.yml
  3. 4
      molecule/infrastructure/destroy.yml
  4. 2
      molecule/infrastructure/molecule.yml
  5. 4
      molecule/infrastructure/roles/docker/tasks/main.yml

2
.yamllint

@ -13,6 +13,8 @@ ignore: |
**/inventories/01-hosts.yml
**/enough/common/data/docker-compose.yml
**/enough/data/docker-compose.yml
# remove me now
**/infrastructure/roles/vm/tasks/main.yml
rules:
braces:

40
molecule/infrastructure/create.yml

@ -28,7 +28,9 @@
loop: "{{ molecule_yml.platforms }}"
roles:
- { role: vm, state: present }
- role: vm
vars:
state: present
tasks:
- name: instance configuration for molecule
@ -72,27 +74,27 @@
- block:
- name: generate subdomain
shell: date +%s | rev | base32 | tr -d =
register: cmd
- set_fact:
domain: "{{ cmd.stdout|lower }}.test.enough.community"
- name: create NS record in test zone (requires access to bind-host.{{ production_domain }})
command: |
ssh -o BatchMode=yes \
-o StrictHostKeyChecking=no \
subdomain@ns1.{{ production_domain }} {{ hosts_updates['all']['hosts']['bind-host']['ansible_host'] }} {{ domain }}
- name: generate subdomain
shell: date +%s | rev | base32 | tr -d =
register: cmd
- set_fact:
domain: "{{ cmd.stdout|lower }}.test.enough.community"
- name: save the test sub-domain
copy:
content: |
domain: {{ domain }}
dest: "../../inventories/common/group_vars/all/domain.yml"
- name: create NS record in test zone (requires access to bind-host.{{ production_domain }})
command: |
ssh -o BatchMode=yes \
-o StrictHostKeyChecking=no \
subdomain@ns1.{{ production_domain }} {{ hosts_updates['all']['hosts']['bind-host']['ansible_host'] }} {{ domain }}
- name: save the test sub-domain
copy:
content: |
domain: {{ domain }}
dest: "../../inventories/common/group_vars/all/domain.yml"
when: hosts_updates['all']['hosts']['bind-host'] is defined and (letsencrypt_nginx_staging | default(false))
- name: Dump instance config
copy:
# NOTE(retr0h): Workaround for Ansible 2.2.

4
molecule/infrastructure/destroy.yml

@ -10,7 +10,9 @@
- ../../clouds.yml
- ../../private-key.yml
roles:
- { role: vm, state: absent }
- role: vm
vars:
state: absent
tasks:
- name: destroy firewall
include_role:

2
molecule/infrastructure/molecule.yml

@ -20,7 +20,7 @@ provisioner:
inventory:
links:
group_vars: ../../inventories/common/group_vars
host_vars: ../../inventories/common/host_vars
host_vars: ../../inventories/common/host_vars
scenario:
name: infrastructure
test_sequence:

4
molecule/infrastructure/roles/docker/tasks/main.yml

@ -1,12 +1,12 @@
---
- name: apt-get install virtualenv, python-pip and python-setuptools
apt:
name: [virtualenv, python-pip, python-setuptools]
name: [ virtualenv, python-pip, python-setuptools ]
state: present
- name: pip install docker and docker-compose
pip:
name: [docker, docker-compose]
name: [ docker, docker-compose ]
- name: Allow debian user to use docker without sudo
user:

Loading…
Cancel
Save