diff --git a/defaults/main.yml b/defaults/main.yml index 6bbb168..7f515c0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -26,6 +26,7 @@ distro_specific_deps: - yum-utils libexec_path: /usr/libexec install_cockpit: True +install_yarn_via_npm: True sitecustomize_path: /usr/lib/python{{ ansible_python_version|regex_replace('^([^\.]*\.[^\.]*)\..*$', '\1') }}/site-packages/sitecustomize.py builddep_command: yum-builddep setup_xforwarding: yes diff --git a/tasks/cockpit.yml b/tasks/cockpit.yml index a9d14b1..0f6edb3 100644 --- a/tasks/cockpit.yml +++ b/tasks/cockpit.yml @@ -11,3 +11,15 @@ enabled: yes state: started become: yes + +- name: install webpack globally + npm: + name: webpack + global: yes + path: /vagrant/subscription-manager/cockpit + become: yes + +- name: install cockpit packages + npm: + state: latest + path: /vagrant/subscription-manager/cockpit diff --git a/tasks/main.yml b/tasks/main.yml index a57400d..7a30c4d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,13 @@ --- +- name: load distribution-specific vars (major version) + include_vars: "{{ item }}" + with_first_found: + - files: + - "{{ ansible_distribution }}{{ ansible_distribution_major_version }}.yml" + paths: vars + skip: yes + register: distro_vars + - name: load distribution-specific vars include_vars: "{{ item }}" with_first_found: @@ -6,6 +15,7 @@ - "{{ ansible_distribution }}.yml" paths: vars skip: yes + when: not distro_vars - name: install epel (centos) yum: name: epel-release @@ -83,7 +93,7 @@ args: creates: "{{ ansible_user_dir }}/.nvm" warn: no - when: install_cockpit + when: install_cockpit and install_yarn_via_npm - name: use nvm to install nodejs shell: > @@ -93,7 +103,7 @@ nvm alias default {{ subman_nodejs_version }}" args: creates: "{{ ansible_user_dir }}/.nvm/versions/node/{{ subman_nodejs_version }}" - when: install_cockpit + when: install_cockpit and install_yarn_via_npm - name: install yarn (for cockpit package build) npm: @@ -102,7 +112,7 @@ global: yes environment: PATH: "{{ ansible_user_dir }}/.nvm/versions/node/{{ subman_nodejs_version }}/bin" - when: install_cockpit + when: install_cockpit and install_yarn_via_npm - include: cockpit.yml when: ansible_distribution == 'Fedora' or (ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7') or (ansible_distribution == 'RedHat' and (ansible_distribution_major_version == '8' or ansible_distribution_major_version == '7')) and install_cockpit diff --git a/vars/Fedora32.yml b/vars/Fedora32.yml new file mode 100644 index 0000000..a8c31d9 --- /dev/null +++ b/vars/Fedora32.yml @@ -0,0 +1,22 @@ +distro_specific_deps: + - dbus-x11 + - dnf-utils + - gcc + - git + - glibc-all-langpacks + - koji + - librsvg2 + - libxslt-devel + - make + - npm + - python3-dmidecode + - python3-ethtool + - python3-dbus + - pygtk2 + - subscription-manager + - tito + - xorg-x11-server-Xvfb +builddep_command: dnf builddep +distro_package_command: dnf +subman_python_interpreter: python3 +install_yarn_via_npm: False