diff options
author | Matt Woodson <mwoodson@gmail.com> | 2016-02-26 09:59:41 -0500 |
---|---|---|
committer | Matt Woodson <mwoodson@gmail.com> | 2016-02-26 09:59:41 -0500 |
commit | 8cd494da04f31b2d163b703f03926785fe3de779 (patch) | |
tree | e203a1b8755c0e757973d1ffca218abda13ac9ce /roles | |
parent | b9a364c1025e1c3075ac2bc8e26f3ceb4d42cb2b (diff) | |
parent | 6f86f71e08a4b1e442a9e33b317c0c37451eed80 (diff) | |
download | openshift-8cd494da04f31b2d163b703f03926785fe3de779.tar.gz openshift-8cd494da04f31b2d163b703f03926785fe3de779.tar.bz2 openshift-8cd494da04f31b2d163b703f03926785fe3de779.tar.xz openshift-8cd494da04f31b2d163b703f03926785fe3de779.zip |
Merge pull request #1505 from mwoodson/os_utils
added os_utils, os_reboot_server role; removed containerization stuff from the updated
Diffstat (limited to 'roles')
-rw-r--r-- | roles/os_reboot_server/tasks/main.yaml | 16 | ||||
-rw-r--r-- | roles/os_update_latest/tasks/main.yml | 5 | ||||
-rw-r--r-- | roles/os_utils/tasks/main.yaml | 17 |
3 files changed, 33 insertions, 5 deletions
diff --git a/roles/os_reboot_server/tasks/main.yaml b/roles/os_reboot_server/tasks/main.yaml new file mode 100644 index 000000000..581ed3e0a --- /dev/null +++ b/roles/os_reboot_server/tasks/main.yaml @@ -0,0 +1,16 @@ +--- +# Role to reboot a server +- name: Restart server + shell: sleep 2 && shutdown -r now "Ansible updates triggered" + async: 1 + poll: 0 + ignore_errors: true + +- name: Wait for server to restart + local_action: + module: wait_for + host={{ ansible_ssh_host }} + port=22 + delay=3 + timeout=300 + sudo: false diff --git a/roles/os_update_latest/tasks/main.yml b/roles/os_update_latest/tasks/main.yml index 2400164fa..ff2b52275 100644 --- a/roles/os_update_latest/tasks/main.yml +++ b/roles/os_update_latest/tasks/main.yml @@ -1,8 +1,3 @@ --- -- fail: - msg: "Update is not yet supported by this playbook on atomic hosts" - when: openshift.common.is_containerized | bool - - name: Update all packages action: "{{ ansible_pkg_mgr }} name=* state=latest" - when: not openshift.common.is_containerized | bool
\ No newline at end of file diff --git a/roles/os_utils/tasks/main.yaml b/roles/os_utils/tasks/main.yaml new file mode 100644 index 000000000..346f6566f --- /dev/null +++ b/roles/os_utils/tasks/main.yaml @@ -0,0 +1,17 @@ +--- +# Utility packages that make things helpful + +- name: Install useful rpm packages + action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" + with_items: + - wget + - git + - net-tools + - bind-utils + - iptables-services + - bridge-utils + - bash-completion + - atop + - htop + - ack + - telnet |