Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info

    Hello, If you guys are interested in working in an AI company. I have several positions open related to Python senior coders; I’m also looking for a Kubernetes expert (baremetal knowledge is desirable, but not excluding), and other open positions related to Linux, please PM if you are interested

    Isn't everything just became public cloud based in 2021 ? Words bare-metal do bring up my nostalgia and I do want to hope that there're some businesses which do bare-metal and private cloud. But all companies I hear about just migrating to public-cloud

    Felix Fontein
    @sl805: the company I work at is happily using bare-metal machines.
    Which is great, atleast something is not public cloud, so will not go down along with it.
    Is it possible to update awx from 1.0.6 to the latest version, without too much pain?
    Current instance was deployed as standalone docker containers, with ansible itself (official method from here https://github.com/ansible/awx/blob/1.0.6/INSTALL.md#docker-or-docker-compose).
    I believe that "Upgrade AWX : docker-compose pull && docker-compose up --force-recreate" not do well thing im my case.
    Thank you for any help.

    Hi i have a question on AWX. I deployed the latest version in a K3s. I added an inventory, my hosts, a project and a template. To log on the host (external to the Kube cluster where AWX is located) I added a Credential (type: Machine ) with a SSH Key.
    But when i launch the a job I ends up with this :

     debug1: Next authentication method: publickey 
     debug1: Trying private key: /home/runner/.ssh/id_rsa 
     debug3: no such identity: /home/runner/.ssh/id_rsa: No such file or directory 
     debug1: Trying private key: /home/runner/.ssh/id_dsa 
     debug3: no such identity: /home/runner/.ssh/id_dsa: No such file or directory 
     debug1: Trying private key: /home/runner/.ssh/id_ecdsa 
     debug3: no such identity: /home/runner/.ssh/id_ecdsa: No such file or directory 
     debug1: Trying private key: /home/runner/.ssh/id_ed25519 
     debug3: no such identity: /home/runner/.ssh/id_ed25519: No such file or directory 
     debug1: Trying private key: /home/runner/.ssh/id_xmss 
     debug3: no such identity: /home/runner/.ssh/id_xmss: No such file or directory 
     debug2: we did not send a packet, disable method 
     debug1: No more authentication methods to try. 
     myuser@myhost: Permission denied (publickey,password).

    The SSH pubkey is correctly setup on the machine, i can log from the machine where AWX is, so i don't understand what's wrong...

    Hi, I'm running a playbook being root user. I want to install Ruby gems for a other user What should I do?
    I tried:
    • name: Install rubygems, sensu-go-agent
      become_user: ec2-user
      shell: gem install sensu-plugin
    • name: Install rubygems, sensu-go-agent
      become_user: ec2-user
      shell: gem install json
    and also
    • name: Install rubygems, sensu-go-agent
      remote_user: ec2-user
      shell: gem install sensu-plugin
    • name: Install rubygems, sensu-go-agent
      remote_user: ec2-user
      shell: gem install json
    Nothing worked,
    Please help
    andrey i. mavlyanov
    Please help me find the repo for ansible collections included with the community ansible package. Lost in docs :((
    amavlyanov: btw if you're using matrix, you can join the rooms #users:ansible.com or #devel:ansible.com for support, as this gitter room is not very active
    1 reply
    amavlyanov: check out the #space:ansible.com for a list of relevant rooms you can participate in
    I think it'll be wise to add link to Matrix space in this gitter chat description
    btw, what is the primary channel: the libera.chat IRC network or Matrix for those channels?
    i'm not actually sure how you edit the room description in a Gitter room. The topic looks very similar to the text on github.com/ansible/ansible, so I'm not sure it makes sense to link Matrix there - but perhaps a link to the community site might make sense
    Carol Chen
    at least on gitter, only those with write access to the associated repo have a "settings" menu to change the welcome message. so I assume it's tied to the repo.
    haha so that was sent from my gitter account
    Petr Kuchyňka
    Hello, I am porting a playbook to AWX. It uses "{{ role_path }}/files/" to store and later distribute some files. However, when running this on AWX, I get "Skipped '/runner/project/roles/reverse_proxy_sync/files/' path due
    to this access issue: '/runner/project/roles/reverse_proxy_sync/files/' is not
    a directory"
    If I get this correctly, the path simply does not exist on the runner. How to address this? Thank you for any advice...
    Hi I am looking for a way to deploy AWX other than a K8s operator
    sal fn

    If I want to set a directory and all the files inside it can be read and executed by both app_user and fluentd user, how to set the directory's permission?

    Will do

    - name: Set group to directory
        path: /app
        group: app_group
        state: directory
        recurse: true
        mode: o+rx         # can it change current permission for app group?

    The current permission like

    $ ls -la /app/app1/
    drwxrwx---. 5 root      app_group   31 Oct 11 14:12 .
    drwxr-xr-x. 3 root      root        21 May 12 2021  ..
    drwxrwx---. 3 app_user  app_group   12 Apr 28 13:30 product

    Or is it right to use mode: a+rx?

    Hi I got a question, I got a playbook to setup a clean debian host where sudo is not yet available. I run my playbook with -u debian -k --ask-become-pass
    during my initial play I check if the username is debian and if so it changes some items that all of my hosts have:
    - name: SETUP - install sudo package
          - sudo
        state: latest
        ansible_become_method: su
    - name: SETUP - Allow sudo user group to have passwordless sudo
        dest: /etc/sudoers
        state: present
        regexp: '^%sudo'
        line: '%sudo ALL=(ALL:ALL) NOPASSWD:ALL'
        validate: 'visudo -cf %s'
        ansible_become_method: su
    - name: SETUP - temporarily add debian to the sudo group
        name: debian
        groups: sudo
        append: yes
        ansible_become_method: su
    - name: SETUP - Set ssh port to 1830
        path: /etc/ssh/sshd_config
        regexp: '^(# *)?Port '
        line: 'Port 1830'
    The last play is not working as I get the error: "debian not in the sudoers file" but when I check my host I can run sudo comments from the debian user. And if I run my playbook again it does work then. Is there a way to reload user privileges from ansible?
    1 reply
    Yes this was confirmed to me in the #users:ansible.com channel on matrix
    Thanks for the reply!
    Ananth Balasubramanian
    Hey all,
    I'm working with ansible ldap module with version 2.9, can i have the role for executing the ppolicy and memberof modules once the ldap created with binddn and bindpassword having parent domain. Advance thanks for getting it.
    3 replies
    Good morning :)

    Hi all,

    I'm facing an issue, a cloud provider have inventory group tag with OS type and version, not only OS type, https://i.imgur.com/rlECBFO.png
    and I want to apply a group_vars to everything inside an OS type (without version), something like that at the end https://i.imgur.com/shIoKNj.png
    isn't this possible ? seem not from what i look for everywhere, do i have a solution as perfect as this one with some kind of trick ? (i don't want to add groups_vars with tag version each time we have more, or add host_vars for each instance...)

    Jimi Sanchez
    Good morning, I am running a provisioning playbook against a chroot'd build environment (packer + amazon-chroot builder) and some of my tasks require checking that some service is installed and enabled etc. Some services like auditd cant be checked via systemctl show or systemctl start/stop/restart and require the sys5 service command and full service name to be used. I am not finding a solution to be able to override the use of systemctl in those instances. I have tried using use:service in the definition but systecmctl was still called.
    @jimilinuxguy: try https://matrix.to/#/#users:ansible.com for user questions
    Adam Kandur

    hi everyone! i'm new in ansible and automation. Tried to use ansible to install some software on created with packer vm and faced this problem

    fatal: [packer_win8.1]: FAILED! => {"changed": false, "msg": "internal error: failed to run exec_wrapper action async_wrapper: Ansible encountered a timeout while waiting for the async task to start and connect to the namedpipe. This can be affected by the performance of the target - you can increase this timeout usingWIN_ASYNC_STARTUP_TIMEOUT or just for this host using the win_async_startup_timeout hostvar if this keeps happening."}

    maybe some of you had this issue and know how to resolve it. It happens some times, not always.

    @keph1r: try https://matrix.to/#/#users:ansible.com for user questions

    Hi I am new to ansible and need some help.
    I am running this command in ansible and do not know from task 1 how to store this as array and pass it to next task.
    The second this is if I am doing it right then how can grep thing work and only show output of grep not the whole thing. Currently it is showing full output which is very time consuming when I have so many hosts.
    Also when I run playbook first time when I reboot my system it ask for sudo password. I have ssh logging enabled between all the nodes. after first time it is not asking for password/. why is that and how can I get rid of it.?

    name: This task is for certificate
    hosts: proxy
    gather_facts: no
    become: yes
    ignore_errors: yes
    ansible_python_interpreter: /usr/bin/python

    name : Find and register multiple vhostname
    for i in $(ls /etc/httpd/sites-enabled/) ;
    do cat /etc/httpd/sites-enabled/$i | grep
    /etc/pki/tls/certs/(This is the vhost location)/vhost_alsoworks_local.crt > /dev/null
    && cat /etc/httpd/sites-enabled/$i | grep ServerName |
    awk {'print $2'} | grep -v CACEVSSL | sort -u ;
    ignore_errors: yes
    register: hostnames

    msg: [ "{{ hostnames.stdout_lines }}" ]

    name: sslyze - get Serial Number, it can be stored into variable
    shell: sslyze --certinfo {{ item }} | egrep 'Serial Number|Not Before|Not After'
    loop: "{{ hostnames.stdout_lines|default([]) }}"
    delegate_to :
    ignore_errors: yes
    check_mode: no
    register: part1

    msg: "{{ part1 }}"

    1 reply
    Isiah cloyd
    So it's going backwards on how something breaks down?
    Can someone help me to know which file in linux "OS" is used to gather facts using facter "facter_az_metadata"
    ansible -i inventory.yaml -m ansible.builtin.setup -a "filter=facter_az_metadata" all
    this comand shows azure vm information, so which file in linux contain that information that I am trying to find

    Hello guys, can someone help me convert this python script to bash?

    # Python 3 program to find the number
    # of primitive roots modulo prime
    from math import gcd
    # Function to return the count of
    # primitive roots modulo p
    def countPrimitiveRoots(p):
        result = 1
        for i in range(2, p, 1):
            if (gcd(i, p) == 1):
                result += 1
        return result
    # Driver code
    if __name__ == '__main__':
        p = 5
        print(countPrimitiveRoots(p - 1))

    This is what I have done on bash so far but I am receiving errors:

    function primitive_roots() {
        local res=1
        for number in $(seq 2 1 $prime_number_p); do
           if (($(expr $(seq 2 1 $prime_number_p)%$prime_number_p)) == 1; then
    I get this error when I run my playbook. fatal: []: FAILED! => {"changed": false, "msg": "Instance creation failed => InvalidKeyPair.NotFound: The key pair 'ec2key.pem' does not exist"} yet the key exists.
    :~/.ssh$ ls
    ec2key.pem  id_ed25519  id_ed25519.pub  id_rsa  id_rsa.pub  known_hosts
    # vars file for create-ec2-instances
    region_name: 'us-east-1'
    key_name: 'ec2key.pem' # Even for ec2key without the extension
    ami_id: 'ami-09d56f8956ab235b3'
    instance_type: 't2.micro'
    instance_name: 'test'
    @simanacci: you might need to add the path to that key
    John Doe
    Can someone suggest how to patch the following issue? ansible/awx#12192
    Justin Georgeson (Work)
    is there a way to get ansible-galaxy to output json or yaml output, something I can parse programmatically?
    I'm building Docker image and want to make sure to pip install a requirements file that is bundled in a collection, I don't want to hard code assumed paths
    John Doe
    Does anyone have any idea what the problem is with this? ansible/awx#12236
    I'm trying to implement something but having a issue