Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to set up a Fedora 32 system for subman development #8

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions tasks/cockpit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 13 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
---
- 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:
- files:
- "{{ ansible_distribution }}.yml"
paths: vars
skip: yes
when: not distro_vars
- name: install epel (centos)
yum:
name: epel-release
Expand Down Expand Up @@ -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: >
Expand All @@ -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:
Expand All @@ -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
Expand Down
22 changes: 22 additions & 0 deletions vars/Fedora32.yml
Original file line number Diff line number Diff line change
@@ -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