ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
811 stars 1.49k forks source link

Support `--devmode` flag in Snap #8155

Open irishgordo opened 5 months ago

irishgordo commented 5 months ago

Summary

It seems that even with something like:

- name: Install microstack
  become: true
  community.general.snap:
    name: microstack
    classic: false
    channel: "{{ openstack_beta_version }}"
    options:
      - devmode=true
      - debug.enable=true

"--devmode" , --devmode in Snap docs doesn't work.

Issue Type

Bug Report

Component Name

snap

Ansible Version

$ ansible --version
ansible [core 2.16.2]
  config file = None
  configured module search path = ['/home/mike/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/mike/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/mike/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/mike/.local/bin/ansible
  python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general
# /home/mike/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 5.5.0  

# /home/mike/.local/lib/python3.10/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 8.1.0  

# /usr/lib/python3/dist-packages/ansible_collections
Collection        Version
----------------- -------
community.general 1.3.6  

Configuration

$ ansible-config dump --only-changed
CONFIG_FILE() = None
PAGER(env: PAGER) = less

OS / Environment

NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Steps to Reproduce

- name: Install microstack
  become: true
  community.general.snap:
    name: microstack
    classic: false
    channel: "{{ openstack_beta_version }}"
    options:
      - devmode=true
      - debug.enable=true

Expected Results

Expecting to have "some" way, doesn't exactly matter how, but at least have some way to toggle the --devmode flag... or pass it in as an option. --dangerous flag was something that seems to have been added not too long ago, hoping the same could exist for --devmode perhaps :smile:

Actual Results


It will install the package, but not in devmode, failing to install with --devmode with that option passed in.

Code of Conduct

ansibullbot commented 5 months ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 5 months ago

cc @angristan @vcarceler click here for bot help

felixfontein commented 5 months ago

options is for configuring things in https://snapcraft.io/docs/configuration-in-snaps. Did you try mode=...?