Parcourir la source

Fix yamllint errors

Tomas Sedovic il y a 7 ans
Parent
commit
bf7e5e8287

+ 2 - 4
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 }}"
-

+ 2 - 4
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 }}"
-

+ 0 - 2
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 }}"
-

+ 0 - 2
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' }
-

+ 1 - 1
playbooks/provisioning/openstack/sample-inventory/clouds.yaml

@@ -1,5 +1,5 @@
+---
 ansible:
   use_hostnames: True
   expand_hostvars: True
   fail_on_errors: True
-

+ 1 - 0
playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml

@@ -1,3 +1,4 @@
+---
 env_id: "openshift"
 public_dns_domain: "example.com"
 public_dns_nameservers: []

+ 0 - 2
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
-

+ 2 - 2
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 }}"

+ 0 - 17
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

+ 27 - 27
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

+ 0 - 1
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 }}"
-

+ 2 - 2
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

+ 1 - 1
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