Giter VIP home page Giter VIP logo

aptly-formula's People

Contributors

aanriot avatar abednarik avatar aboe76 avatar aminet avatar gravyboat avatar iggy avatar lesykm avatar myii avatar nmadhok avatar pgporada avatar puneetk avatar syphernl avatar timwsuqld avatar triggity avatar whiteinge avatar wwentland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aptly-formula's Issues

create mirrors, the unless statement (aptly mirror show ) returns true, so the command is not executed - but returns false (not found) if run from the command line.

re: create mirrors, the unless statement (aptly mirror show ) returns true, so the command is not executed - but returns false (not found) if run from the command line. Any clue?

root@saltmin05:~# aptly mirror show ubuntu-trusty ; echo $?
ERROR: unable to show: mirror with name ubuntu-trusty not found
1

... (cut begging of salt apply output to node above)
ID: add_40976EAF437D05B5_gpg_key
Function: cmd.run
Name: gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keys.gnupg.net --recv-keys 40976EAF437D05B5
Result: True
Comment: Command "gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keys.gnupg.net --recv-keys 40976EAF437D05B5" run
Started: 14:50:27.047222
Duration: 515.744 ms
Changes:
----------
pid:
4545
retcode:
0
stderr:
gpg: requesting key 437D05B5 from hkp server keys.gnupg.net
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key [email protected]" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
stdout:
ID: add_3B4FE6ACC0B21F32_gpg_key
Function: cmd.run
Name: gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keys.gnupg.net --recv-keys 3B4FE6ACC0B21F32
Result: True
Comment: Command "gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keys.gnupg.net --recv-keys 3B4FE6ACC0B21F32" run
Started: 14:50:27.563913
Duration: 379.507 ms
Changes:
----------
pid:
4568
retcode:
0
stderr:
gpg: requesting key C0B21F32 from hkp server keys.gnupg.net
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012) [email protected]" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
stdout:
ID: create_ubuntu-trusty_mirror
Function: cmd.run
Name: aptly mirror create -architectures='amd64' ubuntu-trusty http://us.archive.ubuntu.com/ubuntu/ trusty main
Result: True
Comment: unless execution succeeded
Started: 14:50:27.945660
Duration: 272.457 ms
Changes:
Summary for saltmin05

Succeeded: 21 (changed=4)
Failed: 1

Trailing colon in bzip2 install is causing the formula to fail.

When running the formula I'm getting the following error message -

Data failed to compile:
ID 'bzip2' in SLS 'aptly' contains a short declaration (pkg.installed) with a trailing colon. When not passing any arguments to a state, the colon must be omitted.

default aptly user creation fails

...with the following error:

----------
          ID: aptly_user
    Function: user.present
        Name: aptly
      Result: False
     Comment: Failed to create new user aptly
     Started: 13:14:41.167389
    Duration: 24.448 ms
     Changes:

in the logs state is rendered as below:

aptly_user:
  group.present:
    - name: aptly

  user.present:
    - name: aptly
    - shell: /bin/bash
    - home: /var/lib/aptly

    - require:
      - pkg: aptly_packages

command fails with:

[INFO    ] Running state [aptly] at time 13:14:41.167389
[INFO    ] Executing state user.present for [aptly]
[DEBUG   ] LazyLoaded shadow.info
[DEBUG   ] LazyLoaded user.info
[INFO    ] Executing command useradd in directory '/root'
[ERROR   ] Command 'useradd' failed with return code: 9
[ERROR   ] stderr: useradd: group aptly exists - if you want to add this user to that group, use -g.
[ERROR   ] retcode: 9
[ERROR   ] Failed to create new user aptly
[INFO    ] Completed state [aptly] at time 13:14:41.191837 (duration_in_ms=24.448)

here:

{% if aptly.user.uid %}
- uid: {{ aptly.user.uid }}
{% endif %}
{% if aptly.user.gid %}
- gid: {{ aptly.user.gid }}
- gid_from_name: True
{% endif %}

otherwise salt.user.present complains as we already created a group.

to fix it just add else:

    {% if aptly.user.gid %}
    - gid: {{ aptly.user.gid }}
    - gid_from_name: True
    {% else %}
    - gid: {{ aptly.groupname }}
    {% endif %}

let me know if I misunderstood something.

pillar.example gpg_passphrase quotes

gpg_passphrase needs outer double quotes so that salt will pass through the single quotes on the value. The state run will fail if the gpg_passphrase value contains spaces and is not quoted.

The file init.sls contains obsolete repo

I really don't feel the state aptly_repo belongs in init.sls, that will run in jessie and install the wrong version of aptly. We could wrap in a condition, but I lean towards leaving that out altogether. I feel if someone needs a repo they can add that in a state before the aptly formula is run, no? And it could very well be their own private deb repo anyway.

Jinja variable 'keyid' is undefined when running aptly.create_mirrors

Running Salt 2016.11.3 and keep having issues with the create_mirrors state failing saying that the Jinja variable keyid is undefined.

This is what my mirrors pillar section looks like:

  mirrors:
    datadog:
      url: https://apt.datadoghq.com
      distribution: stable
      components:
        - main
        - 6
      keyid:
        - 382E94DE
      architectures:
        - amd64
    trusty-docker-engine:
      url: https://apt.dockerproject.org/repo
      distribution: ubuntu-trusty
      components:
        - main
      key_url: https://apt.dockerproject.org/gpg
      architectures:
        - amd64
    xenial-docker-engine:
      url: https://apt.dockerproject.org/repo
      distribution: ubuntu-xenial
      components:
        - main
      key_url: https://apt.dockerproject.org/gpg
      architectures:
        - amd64
    trusty-docker-ce:
      url: https://download.docker.com/linux/ubuntu
      distribution: trusty
      components:
        - main
      key_url: https://download.docker.com/linux/ubuntu/gpg
      architectures:
        - amd64
    xenial-docker-ce:
      url: https://download.docker.com/linux/ubuntu
      distribution: xenial
      components:
        - main
      key_url: https://download.docker.com/linux/ubuntu/gpg
      architectures:
        - amd64
    trusty-saltstack-2016_11_3:
      url: http://repo.saltstack.com/apt/ubuntu/14.04/amd64/archive/2016.11.3/
      distribution: trusty
      components:
        - main
      key_url: http://repo.saltstack.com/apt/ubuntu/14.04/amd64/archive/2016.11.3/SALTSTACK-GPG-KEY.pub
      architectures:
        - amd64
    xenial-saltstack-2016_11_3:
      url: http://repo.saltstack.com/apt/ubuntu/16.04/amd64/archive/2016.11.3/
      distribution: xenial
      components:
        - main
      key_url: http://repo.saltstack.com/apt/ubuntu/16.04/amd64/archive/2016.11.3/SALTSTACK-GPG-KEY.pub
      architectures:
        - amd64
    trusty:
      url: http://us-east-1.ec2.archive.ubuntu.com/ubuntu/
      distribution: trusty
      components:
        - main
        - restricted
        - universe
        - multiverse
      keyid:
        - 437D05B5
      architectures:
        - amd64
    trusty-updates:
      url: http://us-east-1.ec2.archive.ubuntu.com/ubuntu/
      distribution: trusty-updates
      components:
        - main
        - restricted
        - universe
        - multiverse
      keyid:
        - 437D05B5
      architectures:
        - amd64
    trusty-backports:
      url: http://us-east-1.ec2.archive.ubuntu.com/ubuntu/
      distribution: trusty-backports
      components:
        - main
        - restricted
        - universe
        - multiverse
      keyid:
        - 437D05B5
      architectures:
        - amd64
    trusty-security:
      url: http://us-east-1.ec2.archive.ubuntu.com/ubuntu/
      distribution: trusty-security
      components:
        - main
        - restricted
        - universe
        - multiverse
      keyid:
        - 437D05B5
      architectures:
        - amd64
    xenial:
      url: http://us-east-1.ec2.archive.ubuntu.com/ubuntu/
      distribution: xenial
      components:
        - main
        - restricted
        - universe
        - multiverse
      keyid:
        - C0B21F32
      architectures:
        - amd64
    xenial-updates:
      url: http://us-east-1.ec2.archive.ubuntu.com/ubuntu/
      distribution: xenial-updates
      components:
        - main
        - restricted
        - universe
        - multiverse
      keyid:
        - C0B21F32
      architectures:
        - amd64
    xenial-backports:
      url: http://us-east-1.ec2.archive.ubuntu.com/ubuntu/
      distribution: xenial-backports
      components:
        - main
        - restricted
        - universe
        - multiverse
      keyid:
        - C0B21F32
      architectures:
        - amd64
    xenial-security:
      url: http://us-east-1.ec2.archive.ubuntu.com/ubuntu/
      distribution: xenial-security
      components:
        - main
        - restricted
        - universe
        - multiverse
      keyid:
        - C0B21F32
      architectures:
        - amd64

Any assistance would be appreciated

Change format of states

We need to update all of the items in this formula from:

pkg:
  - managed

to:

pkg.managed:

and so on.

aptly.create_mirrors: can fail due to tight query loop for keys

When you have a significant number of repos with a significant number of keys often shared between many repos, the key server can interpret your calls as aggressive and fail the requests.

In our case the formula 'aptly.create_mirrors' calls over 101 states.

[centos] Jinja rendering errors

Default init state throws unhandled exceptions on CentOS.
The states should run on most Linux without ugly exceptions.

jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'pkgs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/salt/utils/templates.py", line 169, in render_tmpl
    output = render_str(tmplstr, context, tmplpath)
  File "/usr/lib/python3.6/site-packages/salt/utils/templates.py", line 402, in render_jinja_tmpl
    buf=tmplstr)
salt.exceptions.SaltRenderError: Jinja variable 'dict object' has no attribute 'pkgs'
[CRITICAL] Rendering SLS 'base:aptly' failed: Jinja variable 'dict object' has no attribute 'pkgs'
local:
    Data failed to compile:
----------
    Rendering SLS 'base:aptly' failed: Jinja variable 'dict object' has no attribute 'pkgs'

Pass additional flags to commands?

I want to use aptly to mirror a local unsigned repository. To do this on the command line i would add the -ignore-signatures=true flag to the aptly mirror create command. I didn't see that option in the pillar.example and wonder if there is a way to pass additional flags to the commands.

I am new to Salt, so I apologize if this is an obvious question.

[BUG] nginx.ng method doesn't exist anymore

In the nginx.sls file, nginx.ng.config is included.
But there is a breaking change from the v1.0.0 of nginx-formula.
It would be necessary to change nginx.ng.config to nginx.config

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.