- copy:
    src: hosts
    dest: /etc/hosts

- selinux:
    state: disabled

- shell: dnf -y copr enable seeitcoming/rcm
  when: ansible_distribution == 'Fedora'

- dnf:
    name: rcm
    state: latest
  when: ansible_distribution == 'Fedora'

- dnf: name={{ item }} state=latest
  with_items:
    - python3
    - python3-pip
    - python
    - python-pip
    - golang
    - ghc
    - cabal-install

    - zsh
    - tmux
    - screen
    - vim
    - emacs

    - git
    - subversion
    - mercurial

    - lynx
    - links

    - rubygem-rake
    - bmake
    - shake
    - ninja-build

    - docker
    - ansible
    - gawk
    - nmap
    - bind-utils
    - tig
    - htop
    - cowsay
    - sl

    - python-scikit-learn
    - python3-scikit-learn
    - h5py
    - python3-h5py

    - mecab
    - mecab-devel
    - mecab-ipadic
    - python-mecab
    - python-nltk
    - python3-nltk

- copy:
    src: hosts
    dest: /etc/hosts

- shell: "getent hosts {{ ansible_default_ipv4.address }} | awk '{ print $3 }'"
  register: hostname

- debug:
    var: hostname.stdout

- hostname:
    name: "{{ hostname.stdout }}"

- selinux:
    state: disabled

- shell: dnf -y copr enable seeitcoming/rcm
  when: ansible_distribution == 'Fedora'

- dnf:
    name: rcm
    state: latest
  when: ansible_distribution == 'Fedora'

- dnf: name={{ item }} state=latest
  with_items:
    - python3
    - python3-pip
    - python
    - python-pip
    - golang
    - ghc
    - cabal-install

    - zsh
    - tmux
    - screen
    - vim
    - emacs

    - git
    - subversion
    - mercurial

    - lynx
    - links

    - rubygem-rake
    - bmake
    - shake
    - ninja-build

    - docker
    - ansible
    - gawk
    - nmap
    - bind-utils
    - tig
    - htop
    - cowsay
    - sl

    - python-scikit-learn
    - python3-scikit-learn
    - h5py
    - python3-h5py

    - mecab
    - mecab-devel
    - mecab-ipadic
    - python-mecab
    - python-nltk
    - python3-nltk

Set hostname based on /etc/hosts
Set hostname based on /etc/hosts
