Browse Source

removed the usage of yaml '>' for multiline entries and replaced them with yaml dictionaries as demonstrated by the ansible documentation.

Thomas Wiest 10 years ago
parent
commit
7c1c02f3cc

+ 7 - 6
roles/atomic_base/tasks/bash.yml

@@ -5,9 +5,10 @@
 - name: Link to .profile to .bashrc
   file: src=/root/.bashrc dest=/root/.profile owner=root group=root state=link
 
-- name: Setup Timezone [{{ oo_timezone }}]
-  file: >
-    src=/usr/share/zoneinfo/{{ oo_timezone }}
-    dest=/etc/localtime
-    owner=root
-    group=root state=link
+- name: "Setup Timezone [{{ oo_timezone }}]"
+  file:
+    src: "/usr/share/zoneinfo/{{ oo_timezone }}"
+    dest: /etc/localtime
+    owner: root
+    group: root
+    state: link

+ 9 - 9
roles/atomic_base/tasks/ostree.yml

@@ -1,18 +1,18 @@
 ---
 - name: Copy ostree repo config
-  copy: >
-    src=ostree/repo_config
-    dest=/ostree/repo/config
-    owner=root
-    group=root
-    mode=0644
+  copy:
+    src: ostree/repo_config
+    dest: /ostree/repo/config
+    owner: root
+    group: root
+    mode: 0644
 
 - name: "WORK AROUND: Stat redhat repo file"
   stat: path=/etc/yum.repos.d/redhat.repo
   register: redhat_repo
 
 - name: "WORK AROUND: subscription manager failures"
-  file: >
-    path=/etc/yum.repos.d/redhat.repo
-    state=touch
+  file:
+    path: /etc/yum.repos.d/redhat.repo
+    state: touch
   when: redhat_repo.stat.exists == False

+ 18 - 18
roles/atomic_proxy/tasks/setup_puppet.yml

@@ -1,24 +1,24 @@
 ---
 - name: make puppet conf dir
-  file: >
-    dest={{ oo_proxy_puppet_volume_dir }}/etc/puppet
-    mode=755
-    owner=root
-    group=root
-    state=directory
+  file:
+    dest: "{{ oo_proxy_puppet_volume_dir }}/etc/puppet"
+    mode: 755
+    owner: root
+    group: root
+    state: directory
 
 - name: upload puppet auth config
-  copy: >
-    src=puppet/auth.conf
-    dest={{ oo_proxy_puppet_volume_dir }}/etc/puppet/auth.conf
-    mode=0644
-    owner=root
-    group=root
+  copy:
+    src: puppet/auth.conf
+    dest: "{{ oo_proxy_puppet_volume_dir }}/etc/puppet/auth.conf"
+    mode: 0644
+    owner: root
+    group: root
 
 - name: upload puppet config
-  template: >
-    src=puppet/puppet.conf.j2
-    dest={{ oo_proxy_puppet_volume_dir }}/etc/puppet/puppet.conf
-    mode=0644
-    owner=root
-    group=root
+  template:
+    src: puppet/puppet.conf.j2
+    dest: "{{ oo_proxy_puppet_volume_dir }}/etc/puppet/puppet.conf"
+    mode: 0644
+    owner: root
+    group: root

+ 15 - 10
roles/base_os/tasks/main.yaml

@@ -2,25 +2,30 @@
 # basic role, configures irbrc, vimrc
 
 - name: Ensure irbrc is installed for user root
-  copy: >
-    src=irbrc
-    dest=/root/.irbrc
+  copy:
+    src: irbrc
+    dest: /root/.irbrc
 
 - name: Ensure vimrc is installed for user root
-  copy: >
-    src=vimrc
-    dest=/root/.vimrc
+  copy:
+    src: vimrc
+    dest: /root/.vimrc
 
 - name: Ensure vimrc is installed for user root
-  copy: >
-    src=vimrc
-    dest=/root/.vimrc
+  copy:
+    src: vimrc
+    dest: /root/.vimrc
 
 - name: Install firewalld
-  yum: pkg=firewalld state=installed
+  yum:
+    pkg: firewalld
+    state: installed
 
 - name: enable firewalld service
   command: /usr/bin/systemctl enable firewalld.service
 
 - name: start firewalld service
   command: /usr/bin/systemctl start firewalld.service
+
+- name: need to pause here, otherwise the firewalld service starting can sometimes cause ssh to fail
+  pause: seconds=10

+ 4 - 4
roles/kubernetes_apiserver/tasks/main.yml

@@ -4,10 +4,10 @@
   yum: pkg=kubernetes
 
 - name: Configure apiserver settings
-  lineinfile: >
-    dest=/etc/sysconfig/kubernetes
-    regexp={{ item.regex }}
-    line="{{ item.line }}"
+  lineinfile:
+    dest: /etc/sysconfig/kubernetes
+    regexp: "{{ item.regex }}"
+    line: "{{ item.line }}"
   with_items:
     - { regex: '^KUBE_API_MACHINES=', line: 'KUBE_API_MACHINES=\"{{ oo_minion_ips | join(",") }}\"' }
     - { regex: '^KUBE_API_ADDRESS=',  line: 'KUBE_API_ADDRESS=\"0.0.0.0\"' }

+ 4 - 4
roles/kubernetes_kubelet/tasks/main.yml

@@ -4,10 +4,10 @@
   yum: pkg=kubernetes state=installed
 
 - name: Configure kubelet
-  lineinfile: >
-    dest=/etc/sysconfig/kubernetes
-    regexp={{ item.regex }}
-    line="{{ item.line }}"
+  lineinfile:
+    dest: /etc/sysconfig/kubernetes
+    regexp: "{{ item.regex }}"
+    line: "{{ item.line }}"
   with_items:
     - { regex: '^KUBE_ETCD_SERVERS=', line: 'KUBE_ETCD_SERVERS=\"http://{{ oo_master_ips[0] }}:4001\"' }
     - { regex: '^KUBE_KUBELET_ADDRESS=', line: 'KUBE_KUBELET_ADDRESS=\"0.0.0.0\"' }

+ 4 - 4
roles/kubernetes_proxy/tasks/main.yml

@@ -4,10 +4,10 @@
   yum: pkg=kubernetes state=installed
 
 - name: Configure kubernetes-proxy etcd servers
-  lineinfile: >
-    dest=/etc/sysconfig/kubernetes
-    regexp={{ item.regex }}
-    line="{{ item.line }}"
+  lineinfile:
+    dest: /etc/sysconfig/kubernetes
+    regexp: "{{ item.regex }}"
+    line: "{{ item.line }}"
   with_items:
     - { regex: '^KUBE_ETCD_SERVERS=', line: 'KUBE_ETCD_SERVERS=\"http://{{ oo_master_ips[0] }}:4001\"' }
   notify:

+ 4 - 4
roles/openshift_master/tasks/main.yml

@@ -8,10 +8,10 @@
   command: /usr/bin/hostname {{ oo_bind_ip }}
 
 - name: Configure OpenShift Master settings
-  lineinfile: >
-    dest=/etc/sysconfig/openshift
-    regexp={{ item.regex }}
-    line="{{ item.line }}"
+  lineinfile:
+    dest: /etc/sysconfig/openshift
+    regexp: "{{ item.regex }}"
+    line: "{{ item.line }}"
   with_items:
     - { regex: '^ROLE=', line: 'ROLE=\"master\"' }
     - { regex: '^OPTIONS=', line: 'OPTIONS=\"--nodes={{ oo_minion_ips | join(",") }}  --loglevel=5\"' }

+ 4 - 4
roles/openshift_minion/tasks/main.yml

@@ -8,10 +8,10 @@
   command: /usr/bin/hostname {{ oo_bind_ip }}
 
 - name: Configure OpenShift Minion settings
-  lineinfile: >
-    dest=/etc/sysconfig/openshift
-    regexp={{ item.regex }}
-    line="{{ item.line }}"
+  lineinfile:
+    dest: /etc/sysconfig/openshift
+    regexp: "{{ item.regex }}"
+    line: "{{ item.line }}"
   with_items:
     - { regex: '^ROLE=', line: 'ROLE=\"node\"' }
     - { regex: '^OPTIONS=', line: 'OPTIONS=\"--master=http://{{ oo_master_ips[0] }}:8080  --loglevel=5\"' }

+ 0 - 11
roles/repos/tasks/main.yaml

@@ -1,16 +1,5 @@
 ---
 # The following role lays down the correct repository and gpg key for yum
-
-#- name: Ensure oso rhui rhel 7 server repository exists in yum.repos.d
-#  copy: >
-#    src=oso-rhui-rhel-7-server.repo
-#    dest=/etc/yum.repos.d/oso-rhui-rhel-7-server.repo
-#
-#- name: Ensure Red Hat GPG Key is in place for the previous repo
-#  copy: >
-#    src=RPM-GPG-KEY-redhat-release
-#    dest=/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
-
 - name: Ensure rhel 7 libra candidate exists in yum.repos.d
   copy: src=rhel-7-libra-candidate.repo dest=/etc/yum.repos.d/rhel-7-libra-candidate.repo