summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Sedovic <tomas@sedovic.cz>2017-06-16 17:52:37 +0200
committerTomas Sedovic <tomas@sedovic.cz>2017-06-16 17:52:37 +0200
commitbf7e5e82872684088995cc55559f8e51fe35d4a9 (patch)
treecbb6bc98f51e9959d45f51d684d4799f7164d02b
parentca93151d4dee1f907cf578e3ab2b565f288c37c8 (diff)
downloadopenshift-bf7e5e82872684088995cc55559f8e51fe35d4a9.tar.gz
openshift-bf7e5e82872684088995cc55559f8e51fe35d4a9.tar.bz2
openshift-bf7e5e82872684088995cc55559f8e51fe35d4a9.tar.xz
openshift-bf7e5e82872684088995cc55559f8e51fe35d4a9.zip
Fix yamllint errors
-rw-r--r--playbooks/provisioning/openstack/openstack_dns_records.yml6
-rw-r--r--playbooks/provisioning/openstack/openstack_dns_views.yml6
-rw-r--r--playbooks/provisioning/openstack/post-provision-openstack.yml2
-rw-r--r--playbooks/provisioning/openstack/pre-install.yml2
-rw-r--r--playbooks/provisioning/openstack/sample-inventory/clouds.yaml2
-rw-r--r--playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml1
-rw-r--r--roles/dns-server-detect/tasks/main.yml2
-rw-r--r--roles/hostnames/tasks/main.yaml4
-rw-r--r--roles/hostnames/test/test.yaml17
-rw-r--r--roles/hostnames/vars/records.yaml54
-rw-r--r--roles/openstack-stack/test/stack-create-test.yml1
-rw-r--r--roles/subscription-manager/pre_tasks/pre_tasks.yml4
-rw-r--r--roles/subscription-manager/tasks/main.yml2
13 files changed, 38 insertions, 65 deletions
diff --git a/playbooks/provisioning/openstack/openstack_dns_records.yml b/playbooks/provisioning/openstack/openstack_dns_records.yml
index b1008fe33..b32b70ba9 100644
--- a/playbooks/provisioning/openstack/openstack_dns_records.yml
+++ b/playbooks/provisioning/openstack/openstack_dns_records.yml
@@ -1,5 +1,4 @@
---
-
- name: "Generate list of private A records"
set_fact:
private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': hostvars[item]['ansible_hostname'], 'ip': hostvars[item]['openstack']['private_v4'] } ] }}"
@@ -42,7 +41,7 @@
set_fact:
public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': '*.' + openshift_app_domain, 'ip': hostvars[item]['openstack']['public_v4'] } ] }}"
with_items: "{{ groups['infra_hosts'] }}"
-
+
- name: "Set the public DNS server details to use the external value (if provided)"
set_fact:
nsupdate_server_public: "{{ external_nsupdate_keys['public']['server'] }}"
@@ -72,6 +71,5 @@
entries: "{{ public_records }}"
- name: "Generate the final dns_records_add"
- set_fact:
+ set_fact:
dns_records_add: "{{ private_named_records + public_named_records }}"
-
diff --git a/playbooks/provisioning/openstack/openstack_dns_views.yml b/playbooks/provisioning/openstack/openstack_dns_views.yml
index 611ed9f82..ea0a7cb96 100644
--- a/playbooks/provisioning/openstack/openstack_dns_views.yml
+++ b/playbooks/provisioning/openstack/openstack_dns_views.yml
@@ -1,8 +1,7 @@
---
-
- name: "Generate ACL list for DNS server"
set_fact:
- acl_list: "{{ acl_list | default([]) + [ (hostvars[item]['openstack']['private_v4'] + '/32') ] }}"
+ acl_list: "{{ acl_list | default([]) + [ (hostvars[item]['openstack']['private_v4'] + '/32') ] }}"
with_items: "{{ groups['cluster_hosts'] }}"
- name: "Generate the private view"
@@ -22,6 +21,5 @@
forwarder: "{{ public_dns_nameservers }}"
- name: "Generate the final named_config_views"
- set_fact:
+ set_fact:
named_config_views: "{{ private_named_view + public_named_view }}"
-
diff --git a/playbooks/provisioning/openstack/post-provision-openstack.yml b/playbooks/provisioning/openstack/post-provision-openstack.yml
index e1faf14eb..4e42c1c7f 100644
--- a/playbooks/provisioning/openstack/post-provision-openstack.yml
+++ b/playbooks/provisioning/openstack/post-provision-openstack.yml
@@ -1,5 +1,4 @@
---
-
# Assign hostnames
- hosts: cluster_hosts
become: true
@@ -57,4 +56,3 @@
dest: /etc/sysconfig/network
regexp: "IP4_NAMESERVERS={{ hostvars['localhost'].private_dns_server }}"
line: "IP4_NAMESERVERS={{ hostvars['localhost'].private_dns_server }}"
-
diff --git a/playbooks/provisioning/openstack/pre-install.yml b/playbooks/provisioning/openstack/pre-install.yml
index 4da007a16..629182d49 100644
--- a/playbooks/provisioning/openstack/pre-install.yml
+++ b/playbooks/provisioning/openstack/pre-install.yml
@@ -1,5 +1,4 @@
---
-
###############################
# OpenShift Pre-Requisites
@@ -13,4 +12,3 @@
- { role: subscription-manager, when: hostvars.localhost.rhsm_register, tags: 'subscription-manager', ansible_sudo: true }
- { role: docker, tags: 'docker' }
- { role: openshift-prep, tags: 'openshift-prep' }
-
diff --git a/playbooks/provisioning/openstack/sample-inventory/clouds.yaml b/playbooks/provisioning/openstack/sample-inventory/clouds.yaml
index c266426c6..8182d2995 100644
--- a/playbooks/provisioning/openstack/sample-inventory/clouds.yaml
+++ b/playbooks/provisioning/openstack/sample-inventory/clouds.yaml
@@ -1,5 +1,5 @@
+---
ansible:
use_hostnames: True
expand_hostvars: True
fail_on_errors: True
-
diff --git a/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml b/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml
index 31e0a61ed..047923253 100644
--- a/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml
+++ b/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml
@@ -1,3 +1,4 @@
+---
env_id: "openshift"
public_dns_domain: "example.com"
public_dns_nameservers: []
diff --git a/roles/dns-server-detect/tasks/main.yml b/roles/dns-server-detect/tasks/main.yml
index e8dd0acf0..183c0a0ca 100644
--- a/roles/dns-server-detect/tasks/main.yml
+++ b/roles/dns-server-detect/tasks/main.yml
@@ -1,5 +1,4 @@
---
-
- fail:
msg: 'Missing required private DNS server(s)'
when:
@@ -35,4 +34,3 @@
public_dns_server: "{{ hostvars[groups['dns'][0]].openstack.public_v4 }}"
when:
- public_dns_server is undefined
-
diff --git a/roles/hostnames/tasks/main.yaml b/roles/hostnames/tasks/main.yaml
index bf142d653..c49852210 100644
--- a/roles/hostnames/tasks/main.yaml
+++ b/roles/hostnames/tasks/main.yaml
@@ -15,8 +15,8 @@
register: cloud_cfg
- name: Prevent cloud-init updates of hostname/fqdn (if applicable)
- lineinfile:
- dest: /etc/cloud/cloud.cfg
+ lineinfile:
+ dest: /etc/cloud/cloud.cfg
state: present
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
diff --git a/roles/hostnames/test/test.yaml b/roles/hostnames/test/test.yaml
index 34bf37942..0c56aea51 100644
--- a/roles/hostnames/test/test.yaml
+++ b/roles/hostnames/test/test.yaml
@@ -2,20 +2,3 @@
- hosts: all
roles:
- role: hostnames
-
-# - debug:
-#
-# - hosts: dns
-# roles:
-# - role: dns-server
-# named_config_views:
-# - name: private
-# acl_entry:
-# - 192.168.124.40/32
-# - 192.168.124.40/32
-# zone:
-# - dns_domain: example.com
-# - name: public
-# zone:
-# - dns_domain: example.com
-# - role: dns
diff --git a/roles/hostnames/vars/records.yaml b/roles/hostnames/vars/records.yaml
index 3bf12ae2b..0cadc8181 100644
--- a/roles/hostnames/vars/records.yaml
+++ b/roles/hostnames/vars/records.yaml
@@ -1,28 +1,28 @@
---
- - name: "Building Records"
- set_fact:
- dns_records_add:
- - view: private
- zone: example.com
- entries:
- - type: A
- hostname: master1.example.com
- ip: 172.16.15.94
- - type: A
- hostname: node1.example.com
- ip: 172.16.15.86
- - type: A
- hostname: node2.example.com
- ip: 172.16.15.87
- - view: public
- zone: example.com
- entries:
- - type: A
- hostname: master1.example.com
- ip: 10.3.10.116
- - type: A
- hostname: node1.example.com
- ip: 10.3.11.46
- - type: A
- hostname: node2.example.com
- ip: 10.3.12.6
+- name: "Building Records"
+ set_fact:
+ dns_records_add:
+ - view: private
+ zone: example.com
+ entries:
+ - type: A
+ hostname: master1.example.com
+ ip: 172.16.15.94
+ - type: A
+ hostname: node1.example.com
+ ip: 172.16.15.86
+ - type: A
+ hostname: node2.example.com
+ ip: 172.16.15.87
+ - view: public
+ zone: example.com
+ entries:
+ - type: A
+ hostname: master1.example.com
+ ip: 10.3.10.116
+ - type: A
+ hostname: node1.example.com
+ ip: 10.3.11.46
+ - type: A
+ hostname: node2.example.com
+ ip: 10.3.12.6
diff --git a/roles/openstack-stack/test/stack-create-test.yml b/roles/openstack-stack/test/stack-create-test.yml
index 6cbd7ff30..0fbf66f34 100644
--- a/roles/openstack-stack/test/stack-create-test.yml
+++ b/roles/openstack-stack/test/stack-create-test.yml
@@ -14,4 +14,3 @@
infra_flavor: "{{ openstack_default_flavor }}"
dns_flavor: "{{ openstack_default_flavor }}"
external_network: "{{ openstack_external_network_name }}"
-
diff --git a/roles/subscription-manager/pre_tasks/pre_tasks.yml b/roles/subscription-manager/pre_tasks/pre_tasks.yml
index b21356cf2..464670fc0 100644
--- a/roles/subscription-manager/pre_tasks/pre_tasks.yml
+++ b/roles/subscription-manager/pre_tasks/pre_tasks.yml
@@ -11,7 +11,7 @@
- name: "Determine if Subscription Manager should be used"
set_fact:
rhsm_register: false
- when:
+ when:
- rhsm_satellite is undefined or rhsm_satellite is none or rhsm_satellite|trim == ''
- rhsm_username is undefined or rhsm_username is none or rhsm_username|trim == ''
- rhsm_password is undefined or rhsm_password is none or rhsm_password|trim == ''
@@ -21,7 +21,7 @@
- name: "Validate Subscription Manager organization is set"
fail: msg="Cannot register to a Satellite server without a value for the Organization via 'rhsm_org'"
- when:
+ when:
- rhsm_org is undefined or rhsm_org is none or rhsm_org|trim == ''
- rhsm_satellite is defined
- rhsm_satellite is not none
diff --git a/roles/subscription-manager/tasks/main.yml b/roles/subscription-manager/tasks/main.yml
index 2dd14b48e..8c1ae697a 100644
--- a/roles/subscription-manager/tasks/main.yml
+++ b/roles/subscription-manager/tasks/main.yml
@@ -4,7 +4,7 @@
rhsm_password: "{{ hostvars.localhost.rhsm_password }}"
when:
- rhsm_password is not defined or rhsm_password is none or rhsm_password|trim == ''
-
+
- name: "Initializing Subscription Manager authentication method"
set_fact:
rhsm_authentication: false