Skip to content

Instantly share code, notes, and snippets.

@eparis
Last active August 29, 2015 14:23
Show Gist options
  • Save eparis/b22bf512e0f390f9203e to your computer and use it in GitHub Desktop.
Save eparis/b22bf512e0f390f9203e to your computer and use it in GitHub Desktop.
18:48:37 rpm -qa kube\* brew\*
18:48:37 kubernetes-unit-test-0.17.1-6.el7.x86_64
18:48:37 brewkoji-1.9-1.el7eng.noarch
18:48:54
18:48:54 PLAY [ans_cluster_post] *******************************************************
18:48:54
18:48:54 TASK: [Install basic packages] ************************************************
18:48:54 ok: [10.8.53.188] => (item=brewkoji,coreutils,etcd,hostname,rsync,NetworkManager)
18:48:54
18:48:54 TASK: [Show result of pkg update] *********************************************
18:48:54 ok: [10.8.53.188] => {
18:48:54 "result": {
18:48:54 "changed": false,
18:48:54 "failed": false,
18:48:54 "failed_when_result": false,
18:48:54 "invocation": {
18:48:54 "module_args": "name=brewkoji,coreutils,etcd,hostname,rsync,NetworkManager state=latest",
18:48:54 "module_name": "yum"
18:48:54 },
18:48:54 "item": "brewkoji,coreutils,etcd,hostname,rsync,NetworkManager",
18:48:54 "msg": "No Package matching 'brewkoji' found available, installed or updated",
18:48:54 "rc": 0,
18:48:54 "results": []
18:48:54 }
18:48:54 }
18:48:54
18:48:54 TASK: [Make sure kubernetes-unit-test is not installed] ***********************
18:48:54 ok: [10.8.53.188] => (item=kubernetes-unit-test)
18:48:54
18:48:54 TASK: [Show result of kube removal] *******************************************
18:48:54 ok: [10.8.53.188] => {
18:48:54 "result": {
18:48:54 "changed": false,
18:48:54 "invocation": {
18:48:54 "module_args": "name=kubernetes-unit-test state=absent",
18:48:54 "module_name": "yum"
18:48:54 },
18:48:54 "item": "kubernetes-unit-test",
18:48:54 "msg": "",
18:48:54 "rc": 0,
18:48:54 "results": [
18:48:54 "kubernetes-unit-test is not installed"
18:48:54 ]
18:48:54 }
18:48:54 }
18:48:54
[snip plays with NO yum module]
18:48:54 PLAY RECAP ********************************************************************
18:48:54 10.8.53.188 : ok=8 changed=0 unreachable=0 failed=0
18:48:54
18:48:54 rpm -qa kube\* brew\*
18:48:54 kubernetes-unit-test-0.17.1-6.el7.x86_64
18:48:54 brewkoji-1.9-1.el7eng.noarch
- name: ans_cluster_post
hosts: '{{ hosts | default("masters") }}'
gather_facts: false
sudo: false
tasks:
- name: Install basic packages
yum: name={{ item }} state=latest
with_items:
- brewkoji
- coreutils
- etcd
- hostname
- rsync
- NetworkManager
register: result
failed_when: result.rc != 0 and "No Package matching 'brewkoji'" not in result.stdout
- name: Show result of pkg update
debug: var=result
- name: Make sure kubernetes-unit-test is not installed
yum: name={{ item }} state=absent
with_items:
- "kubernetes-unit-test"
register: result
- name: Show result of kube removal
debug: var=result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment