summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorThomas Wiest <twiest@redhat.com>2015-02-04 11:47:00 -0500
committerThomas Wiest <twiest@redhat.com>2015-02-05 15:53:32 -0500
commit7c1c02f3cc202acbc662f52fbc9a17911b044f24 (patch)
tree42cfe00df40943e902d2a4e73274db308b57c5b5 /roles
parent076434d7a1026540f0eee5479adddc895d73b9b0 (diff)
downloadopenshift-7c1c02f3cc202acbc662f52fbc9a17911b044f24.tar.gz
openshift-7c1c02f3cc202acbc662f52fbc9a17911b044f24.tar.bz2
openshift-7c1c02f3cc202acbc662f52fbc9a17911b044f24.tar.xz
openshift-7c1c02f3cc202acbc662f52fbc9a17911b044f24.zip
removed the usage of yaml '>' for multiline entries and replaced them with yaml dictionaries as demonstrated by the ansible documentation.
Diffstat (limited to 'roles')
-rw-r--r--roles/atomic_base/tasks/bash.yml13
-rw-r--r--roles/atomic_base/tasks/ostree.yml18
-rw-r--r--roles/atomic_proxy/tasks/setup_puppet.yml36
-rw-r--r--roles/base_os/tasks/main.yaml25
-rw-r--r--roles/kubernetes_apiserver/tasks/main.yml8
-rw-r--r--roles/kubernetes_kubelet/tasks/main.yml8
-rw-r--r--roles/kubernetes_proxy/tasks/main.yml8
-rw-r--r--roles/openshift_master/tasks/main.yml8
-rw-r--r--roles/openshift_minion/tasks/main.yml8
-rw-r--r--roles/repos/tasks/main.yaml11
10 files changed, 69 insertions, 74 deletions
diff --git a/roles/atomic_base/tasks/bash.yml b/roles/atomic_base/tasks/bash.yml
index 6e577971a..547ae83c3 100644
--- a/roles/atomic_base/tasks/bash.yml
+++ b/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
diff --git a/roles/atomic_base/tasks/ostree.yml b/roles/atomic_base/tasks/ostree.yml
index b9d366f1b..aacaa5efd 100644
--- a/roles/atomic_base/tasks/ostree.yml
+++ b/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
diff --git a/roles/atomic_proxy/tasks/setup_puppet.yml b/roles/atomic_proxy/tasks/setup_puppet.yml
index e711d06c1..7a599f06d 100644
--- a/roles/atomic_proxy/tasks/setup_puppet.yml
+++ b/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
diff --git a/roles/base_os/tasks/main.yaml b/roles/base_os/tasks/main.yaml
index ff8cfbe33..01d2898c5 100644
--- a/roles/base_os/tasks/main.yaml
+++ b/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
diff --git a/roles/kubernetes_apiserver/tasks/main.yml b/roles/kubernetes_apiserver/tasks/main.yml
index 622ecd5ca..81fdbbb40 100644
--- a/roles/kubernetes_apiserver/tasks/main.yml
+++ b/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\"' }
diff --git a/roles/kubernetes_kubelet/tasks/main.yml b/roles/kubernetes_kubelet/tasks/main.yml
index 48eab7f84..b48c0039a 100644
--- a/roles/kubernetes_kubelet/tasks/main.yml
+++ b/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\"' }
diff --git a/roles/kubernetes_proxy/tasks/main.yml b/roles/kubernetes_proxy/tasks/main.yml
index 901b5f3ad..407c9ab46 100644
--- a/roles/kubernetes_proxy/tasks/main.yml
+++ b/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:
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 3cfb2dd7d..6826ef452 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/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\"' }
diff --git a/roles/openshift_minion/tasks/main.yml b/roles/openshift_minion/tasks/main.yml
index e328eb5d5..3821277bc 100644
--- a/roles/openshift_minion/tasks/main.yml
+++ b/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\"' }
diff --git a/roles/repos/tasks/main.yaml b/roles/repos/tasks/main.yaml
index 48c123ab1..3b66bb392 100644
--- a/roles/repos/tasks/main.yaml
+++ b/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