Noob help
Reddit » Ansible
by /u/ponyboy3
2d ago
Could someone please help me out, the error is that each of the found files already exist. Thanks I appreciate it! home-assistant - name: Recursively change ownership of a directory ansible.builtin.file: dest: "{{ item }}" state: directory recurse: yes owner: root group: root mode: '0644' with_fileglob: - "/etc/ssh/*key*" submitted by /u/ponyboy3 [visit reddit] [comments ..read more
Visit website
How to loop through a list to perform a conditional action?
Reddit » Ansible
by /u/FragilePower
2d ago
I have a set_fact task where I want to loop through some keys in a dict and only set the variable value based on certain conditions. What seems to be happening though is that the when: conditional is superseding with_items:, causing the conditional to fail and the task to not run. Is there a specific way I need to implement this, or is there maybe an issue with my syntax? - name: Set value if substring in key set_fact: var_a: "{{ item.key }} when: "substring_x in item.key" with_items: "{{ my_dict | dict2items }}" submitted by /u/FragilePower [visit reddit] [comments ..read more
Visit website
Unreachable hosts
Reddit » Ansible
by /u/HumbleFail4017
2d ago
Hi there, I just start to use Ansible in our environment. Mixed feeling so far. Anyway, I pass some linux command's result to a variable like this: name: get uptime ansible.builtin.shell: uptime -p register: uptimevar When all servers are up, this works fine. But when some servers are unreachable, Ansible playbook didn't return what I need. I'd like Ansible assign something like 'Unreachable' to uptimevar when server is unreacheable. How can I do it? Thanks! submitted by /u/HumbleFail4017 [visit reddit] [comments ..read more
Visit website
Handle errors in Ansible playbook
Reddit » Ansible
by /u/HumbleFail4017
2d ago
Hi there, I just start to use Ansible in our environment. Mixed feeling so far. Anyway, I pass some linux command's result to a variable like this: name: get uptime ansible.builtin.shell: uptime -p register: uptimevar When all servers are up, this works fine. But when some servers are unreachable, Ansible playbook didn't return what I need. I'd like Ansible assign something like 'Unreachable' to uptimevar when server is unreacheable. How can I do it? Thanks! submitted by /u/HumbleFail4017 [visit reddit] [comments ..read more
Visit website
Ansible-pylibssh not installed - MacOS 14.4.1 homebrew
Reddit » Ansible
by /u/CupcakePWR
2d ago
Apologies if I should've directed this question for homebrew, mac or similar, but I have been struggling getting ansible to work on my Mac laptop and I am kind of at a loss for what to do. Also I'm still, maybe obviously, on the novice side of ansible, however, I've always been able to do this much when running the same setup from any Linux machine I've tried. I'm trying to connect to a switch using ansible, but I always get a an error saying "msg": "Failed to authenticate: Authentication failed: transport shut down or saw EOF" However, I am 100% certain I'm typing the correct password, even ..read more
Visit website
Ansible inventory "ssh: Could not resolve hostname nodeserver: Temporary failure in name resolution""
Reddit » Ansible
by /u/Powerful_Peace_4062
2d ago
Hello! Im currently stuck, Im trying to use an ansible-playbook to create a kvm inside proxmox. My playbook does not prompt any issues when run, however i get following fatal error: TASK [Create MC VM] *************************************************************************** fatal: [nodeserver]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname nodeserver: Temporary failure in name resolution", "unreachable": true} This is my inventory file (with commented out failed tests) #[linux] #root@192.168.100.106 #ansible_ssh_pass ..read more
Visit website
Transfer large file to server (very slow) - What is best practice?
Reddit » Ansible
by /u/Teggers_Today
2d ago
*SOLVED - problem was with rsync *** I created a play to restore a backup on a server: - name: Synchronize local backup files to remote server ansible.posix.synchronize: src: "{{ local_backup_root_directory }}/{{ local_selected_backup_directory }}/" dest: "{{ remote_backup_directory }}/" mode: push archive: yes rsync_opts: - "--archive" - "--compress" - "--partial" - "--progress" - "--rsync-path=rsync" - "--no-perms" - "--no-owner" - name: Extract bitnami backup on remote server ansible.builtin.unarchive: src: "{{ remote_backup_directory }}/bitnami_backup.tar.gz" dest: /home/user/bitnami remo ..read more
Visit website
Variable value
Reddit » Ansible
by /u/linkme99
2d ago
Good day everyone, I think I'm having a silly issue trying to assing a variable value to a vars_files, take a look please: name: test hosts: all become: true vars: pak: "{{ ansible_facts['os_family'] }}" vars_files: "apache_default.yml" "apache_{{ pak }}.yml" when running the playbook I get the error: apache_{{ pak }}.yml was not found because the file I want to be found is apache_RedHat.yml, but the variable value is not being assigned to the file name. Thanks in advance. submitted by /u/linkme99 [visit reddit] [comments ..read more
Visit website
The Bullhorn - Issue #139
Reddit » Ansible
by /u/leonardogallego
2d ago
This week in Ansible Community Issue #139, 2024-05-27 (Past Issues) Welcome to The Bullhorn, our newsletter for the Ansible Community. If you have any questions or content you’d like to share, you're welcome to chat with us in the Ansible Social room on Matrix, and mention newsbot to have your news item tagged for review for the next weekly issue! KEY DATES ⏱️ 2024-05-28: DaWGs meeting, 15:00 UTC 2024-05-29: Community WG meeting, 18:00 UTC 2024-05-30: Bullhorn #137 content deadline, 18:00 UTC 2024-06-17: ETA for Ansible-Core 2.17.1 2024-06-04: ETA for Ansible-10.0.0rc2 when necessary, other ..read more
Visit website
Playbook for citrix
Reddit » Ansible
by /u/BigRevolutionary4858
2d ago
Hello, How can I send a command either by shell or commad to a Citrix machine? Regards; submitted by /u/BigRevolutionary4858 [visit reddit] [comments ..read more
Visit website

Follow Reddit » Ansible on FeedSpot

Continue with Google
Continue with Apple
OR