Skip to content
Snippets Groups Projects
zsh.yml 1.09 KiB
Newer Older
Bo-Chun Chen's avatar
Bo-Chun Chen committed
---
Bo-Chun Chen's avatar
Bo-Chun Chen committed
- name: Install zsh dependencies
  ansible.builtin.yum:
Bo-Chun Chen's avatar
Bo-Chun Chen committed
    name:
Bo-Chun Chen's avatar
Bo-Chun Chen committed
      - autoconf
      - bzip2
      - coreutils
      - epel-release
      - gawk
Bo-Chun Chen's avatar
Bo-Chun Chen committed
      - gcc
Bo-Chun Chen's avatar
Bo-Chun Chen committed
      - gdbm-devel
      - git
      - grep
      - gzip
      - hostname
      - libcap-devel
      - make
Bo-Chun Chen's avatar
Bo-Chun Chen committed
      - ncurses-devel
Bo-Chun Chen's avatar
Bo-Chun Chen committed
      - pcre-devel
      - rpm-build
      - sed
      - tar
      - texi2html
      - texinfo
      - xz
Bo-Chun Chen's avatar
Bo-Chun Chen committed
- name: Download and untar zsh
  ansible.builtin.unarchive:
    src: "{{ zsh_src_url }}"
Bo-Chun Chen's avatar
Bo-Chun Chen committed
    dest: /tmp
    remote_src: true
    validate_certs: no

- name: Configure zsh
  ansible.builtin.command: ./configure --with-tcsetpgrp
Bo-Chun Chen's avatar
Bo-Chun Chen committed
  args:
    chdir: "/tmp/zsh-{{ zsh_ver }}"
Bo-Chun Chen's avatar
Bo-Chun Chen committed
  become: true

- name: Make zsh
  ansible.builtin.command: make
  args:
    chdir: "/tmp/zsh-{{ zsh_ver }}"
Bo-Chun Chen's avatar
Bo-Chun Chen committed
  become: true

- name: Install zsh
  ansible.builtin.command: make install
  args:
    chdir: "/tmp/zsh-{{ zsh_ver }}"
Bo-Chun Chen's avatar
Bo-Chun Chen committed
  become: true

- name: Add zsh into /etc/shells
  ansible.builtin.lineinfile:
    path: /etc/shells
    line: /usr/local/bin/zsh
    state: present
    owner: root
    group: root
    mode: '0644'
  become: true